load the model object for the C<books>, C<book_authors>, and C<authors>
tables created in the previous step.
-Open C<lib/MyAppDB.pm> in your editor and insert:
+Create C<lib/MyAppDB.pm> in your editor and insert:
package MyAppDB;
$ mkdir lib/MyAppDB
-Then open C<lib/MyAppDB/Book.pm> in your editor and enter:
+Then create C<lib/MyAppDB/Book.pm> in your editor and enter:
package MyAppDB::Book;
Note that you cannot define a C<many_to_many> relationship without also
having the C<has_many> relationship in place.
-Next, open C<lib/MyAppDB/Author.pm> in your editor and enter:
+Next, create C<lib/MyAppDB/Author.pm> in your editor and enter:
package MyAppDB::Author;
1;
-Finally, open C<lib/MyAppDB/BookAuthor.pm> in your editor and enter:
+Finally, create C<lib/MyAppDB/BookAuthor.pm> in your editor and enter:
package MyAppDB::BookAuthor;
response output. Catalyst v5.7000 ships with a new mechanism,
L<Catalyst::Action::RenderView|Catalyst::Action::RenderView>, that
automatically performs this operation. If you look in
-C<lib/MyApp/Controller/Root.pm>, you should see the this empty
+C<lib/MyApp/Controller/Root.pm>, you should see the empty
definition for the C<sub end> method:
sub end : ActionClass('RenderView') {}
$ mkdir root/src/books
-Then open C<root/src/books/list.tt2> in your editor and enter:
+Then create C<root/src/books/list.tt2> in your editor and enter:
[% # This is a TT comment. The '-' at the end "chomps" the newline. You won't -%]
[% # see this "chomping" in your browser because HTML ignores blank lines, but -%]