From: Arthur Axel 'fREW' Schmidt Date: Fri, 28 May 2010 05:13:15 +0000 (-0500) Subject: DBIx::Class::Core > DBIx::Class X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a65778d918509ef65a90e8dd0b773610ab08557;p=dbsrgits%2Fdbix-class-introduction-presentation.git DBIx::Class::Core > DBIx::Class --- diff --git a/slideshow.html b/slideshow.html index 47f8132..8ae42cb 100644 --- a/slideshow.html +++ b/slideshow.html @@ -457,8 +457,8 @@ Foo::Schema::ResultSet::Book

Result::

-
package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+
package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
 use strict;
 use warnings;
 
@@ -485,8 +485,8 @@ sub isbn {
 
    

Result:: (inflating)

-
package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+
package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
 use strict;
 use warnings;
 
@@ -561,7 +561,7 @@ my @books        = $book_rs->all;
or
my $book_rs = $schema->resultset('Book')
-  ->the_ultimate_books();
+  ->the_ultimate_books;
 $book_rs = $book_rs->by_author($author);
# Debug (SQL):
 
@@ -585,12 +585,8 @@ my @books = $rs->all;

overloading before new record

-
- -
-

overloading before new record

-
package Foo::Schema::Result::Authors;
-use base 'DBIx::Class';
+      
package Foo::Schema::Result::Author;
+use base 'DBIx::Class::Core';
 
 sub new {
    my ( $class, $attrs ) = @_;
@@ -703,8 +699,8 @@ __PACKAGE__->belongs_to(
 
    

many_to_many

-
package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+      
package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
 
 __PACKAGE__->many_to_many(
    authors => "author_and_books", 'author'
@@ -717,8 +713,8 @@ __PACKAGE__->many_to_many(
 
    

many_to_many

-
package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+      
package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
 
 __PACKAGE__->many_to_many(
    authors # Accessor name
@@ -731,8 +727,8 @@ __PACKAGE__->many_to_many(
 
    

many_to_many

-
package Foo::Schema::Result::Authors;
-use base 'DBIx::Class';
+      
package Foo::Schema::Result::Author;
+use base 'DBIx::Class::Core';
 
 __PACKAGE__->many_to_many(
    "books" # Accessor Name