From: Arthur Axel 'fREW' Schmidt Date: Fri, 28 May 2010 05:23:26 +0000 (-0500) Subject: clean up last of code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c562ff1ece6be723298996054816f5f4269d571;p=dbsrgits%2Fdbix-class-introduction-presentation.git clean up last of code --- diff --git a/slideshow.html b/slideshow.html index d419494..6235f98 100644 --- a/slideshow.html +++ b/slideshow.html @@ -702,13 +702,12 @@ __PACKAGE__->many_to_many(
-

using many_to_many

-
#!/usr/bin/perl
-
+      

Using many_to_many

+
#!perl
 use Foo::Schema;
-
-my $author_model = Foo::Schema->resultset('Authors');
-my $author       = $author_model->search({
+my $schema    = Foo::Schema->connect(...);
+my $author_rs = $schema->resultset('Authors');
+my $author    = $author_model->search({
    name => 'Douglas Adams',
 })->single;
 $author->add_to_books({