There were a few more errors in the remainder of the section, which may
be addressed by the following:
[ian@alula ~]$ diff -U 3 /usr/lib/perl5/site_perl/5.8.8/Catalyst/Manual/
Tutorial/MoreCatalystBasics.pod ./MoreCatalystBasics.pod
--- /usr/lib/perl5/site_perl/5.8.8/Catalyst/Manual/Tutorial/
MoreCatalystBasics.pod 2008-11-05 10:33:06.000000000 +1300
+++ ./MoreCatalystBasics.pod 2008-12-07 10:09:28.000000000 +1300
@@ -761,12 +761,12 @@
a reference to the actual schema file in C<lib/MyApp/Schema.pm>
along with the database connect string.
-If you look in the C<lib/MyApp/Schema> directory, you will find that
-C<DB.pm> is no longer using L<DBIx::Class::Schema::Loader> as its
+If you look in the C<lib/MyApp> directory, you will find that
+C<Schema.pm> is no longer using L<DBIx::Class::Schema::Loader> as its
base class (L<DBIx::Class::Schema::Loader> is only being used by the
helper to load the schema once and then create the static files for
us)
and that it only contains a call to the C<load_classes> method. You
-will also find that C<lib/MyApp/Schema> contains a C<Schema>
+will also find that C<lib/MyApp> contains a C<Schema>
subdirectory, with one file inside this directory for each of the
tables
in our simple database (C<Authors.pm>, C<BookAuthors.pm>, and
C<Books.pm>). These three files were created based on the information
@@ -894,7 +894,28 @@
table-specific schema classes we created).
Then hit the URL L<
http://localhost:3000/books/list> and be sure that
-the book list is displayed.
+the relationships are loaded.
+
+B<Note:> You will not see the authors yet because the view does not
+yet use the new relations. We will change the view a bit later.
+
+When you load the book list in your browser, you should see the
following
+queries logged by the test server:
+
+ [info] MyApp powered by Catalyst 5.7015
+ You can connect to your server at
http://alula.local:3000
+ SELECT me.id, me.title, me.rating FROM books me:
+ SELECT me.book_id, me.author_id FROM book_authors me WHERE
( me.book_id = ? ): '1'
+ SELECT me.book_id, me.author_id FROM book_authors me WHERE
( me.book_id = ? ): '2'
+ SELECT me.book_id, me.author_id FROM book_authors me WHERE
( me.book_id = ? ): '3'
+ SELECT me.book_id, me.author_id FROM book_authors me WHERE
( me.book_id = ? ): '4'
+ SELECT me.book_id, me.author_id FROM book_authors me WHERE
( me.book_id = ? ): '5'
+ [info] *** Request 1 (0.200/s) [20732] [Sun Dec 7 09:47:17 2008]
***
+ [debug] "GET" request for "books/list" from "127.0.0.1"
+ [debug] Path is "books/list"
+ [debug] Rendering template "books/list.tt2"
+ [info] Request took 0.715513s (1.398/s)
+
=head1 RUNNING THE APPLICATION FROM THE COMMAND LINE
@@ -940,10 +961,10 @@
[% tt_authors.join(', ') | html %]
</td>
-Then hit C<Ctrl+R> in your browser (not that you don't need to reload
+Then hit C<Ctrl+R> in your browser (note that you don't need to reload
the development server or use the C<-r> option when updating TT
-templates) and you should now the the number of authors each book and
-a comma-separated list of the author's last names.
+templates) and you should now see the the number of authors of each
book
+and a comma-separated list of the author's last names.
If you are still running the development server with C<DBIC_TRACE>
enabled, you should also now see five more C<SELECT> statements in the