<div class="slide">
<h1>Result::</h1>
-<pre>package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+<pre>package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
use strict;
use warnings;
<div class="slide">
<h1>Result:: (inflating)</h1>
-<pre>package Foo::Schema::Result::Books;
-use base 'DBIx::Class';
+<pre>package Foo::Schema::Result::Book;
+use base 'DBIx::Class::Core';
use strict;
use warnings;
or
<pre>my $book_rs = $schema->resultset('Book')
- ->the_ultimate_books();
+ ->the_ultimate_books;
$book_rs = $book_rs->by_author($author);</pre>
<pre># Debug (SQL):
<div class="slide">
<h1>overloading before new record</h1>
- </div>
-
- <div class="slide">
- <h1>overloading before new record</h1>
- <pre>package Foo::Schema::Result::Authors;
-use base 'DBIx::Class';
+ <pre>package Foo::Schema::Result::Author;
+use base 'DBIx::Class::Core';
sub new {
my ( $class, $attrs ) = @_;
<div class="slide">
<h1>many_to_many</h1>
- <pre>package Foo::Schema::<strong>Result::Books</strong>;
-use base 'DBIx::Class';
+ <pre>package Foo::Schema::<strong>Result::Book</strong>;
+use base 'DBIx::Class::Core';
__PACKAGE__->many_to_many(
authors => "author_and_books", 'author'
<div class="slide">
<h1>many_to_many</h1>
- <pre>package Foo::Schema::<strong>Result::Books</strong>;
-use base 'DBIx::Class';
+ <pre>package Foo::Schema::<strong>Result::Book</strong>;
+use base 'DBIx::Class::Core';
__PACKAGE__->many_to_many(
authors <strong># Accessor name</strong>
<div class="slide">
<h1>many_to_many</h1>
- <pre>package Foo::Schema::Result::Authors;
-use base 'DBIx::Class';
+ <pre>package Foo::Schema::Result::Author;
+use base 'DBIx::Class::Core';
__PACKAGE__->many_to_many(
"books" <strong># Accessor Name</strong>