Convert to use of "-r" dev server option
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / 09_AdvancedCRUD / 09_FormFu.pod
index 113720f..732165a 100644 (file)
@@ -77,14 +77,19 @@ add additional functionality to the manually created form from Chapter 4.
 
 First, change your C<lib/MyApp/Controller/Books.pm> to inherit from
 L<Catalyst::Controller::HTML::FormFu|Catalyst::Controller::HTML::FormFu>
-by changing the C<use parent> line from the default of:
+by changing the C<extends> line from the default of:
 
-    use parent 'Catalyst::Controller';
+    BEGIN {extends 'Catalyst::Controller'; }
 
 to use the FormFu base controller class:
 
-    use parent 'Catalyst::Controller::HTML::FormFu';
+    BEGIN {extends 'Catalyst::Controller::HTML::FormFu'; }
 
+Don't forget to add:
+
+    requires 'Catalyst::Controller::HTML::FormFu';
+
+to your C<Makefile.PL>.
 
 =head2 Add Action to Display and Save the Form
 
@@ -219,7 +224,8 @@ Open C<root/src/books/formfu_create.tt2> in your editor and enter the following:
     [%# Render the HTML::FormFu Form %]
     [% form %]
     
-    <p><a href="[% c.uri_for(c.controller.action_for('list')) %]">Return to book list</a></p>
+    <p><a href="[% c.uri_for(c.controller.action_for('list')) 
+        %]">Return to book list</a></p>
 
 
 =head2 Add Links for Create and Update via C<HTML::FormFu>
@@ -239,19 +245,18 @@ use to easily launch our HTML::FormFu-based form.
 
 =head2 Test The HTML::FormFu Create Form
 
-Press C<Ctrl-C> to kill the previous server instance (if it's still
-running) and restart it:
+Make sure the server is running with the "-r" restart option:
 
-    $ script/myapp_server.pl
+    $ script/myapp_server.pl -r
 
 Login as C<test01> (password: mypass).  Once at the Book List page,
 click the new HTML::FormFu "Create" link at the bottom to display the
 form.  Fill in the following values:
 
-Title:  Internetworking with TCP/IP Vol. II
-Rating: 4
-Author: Comer
-    
+    Title:  Internetworking with TCP/IP Vol. II
+    Rating: 4
+    Author: Comer
+
 Click the Submit button, and you will be returned to the Book List page
 with a "Book created" status message displayed.
 
@@ -402,11 +407,6 @@ for more filter options.
 
 =head2 Try Out the Updated Form
 
-Press C<Ctrl-C> to kill the previous server instance (if it's still 
-running) and restart it:
-
-    $ script/myapp_server.pl
-
 Make sure you are still logged in as C<test01> and try adding a book 
 with various errors: title less than 5 characters, non-numeric rating, a 
 rating of 0 or 6, etc.  Also try selecting one, two, and zero authors. 
@@ -539,11 +539,6 @@ existing C<delete> link.
 
 =head2 Try Out the Edit/Update Feature
 
-Press C<Ctrl-C> to kill the previous server instance (if it's still 
-running) and restart it:
-
-    $ script/myapp_server.pl
-
 Make sure you are still logged in as C<test01> and go to the 
 L<http://localhost:3000/books/list> URL in your browser.  Click the 
 "Edit" link next to "Internetworking with TCP/IP Vol. II", change the