[Catalyst-commits] r8705 - trunk/Catalyst-Plugin-FillInForm/lib/Catalyst/Plugin

jester at dev.catalyst.perl.org jester at dev.catalyst.perl.org
Wed Dec 3 17:25:35 GMT 2008


Author: jester
Date: 2008-12-03 17:25:35 +0000 (Wed, 03 Dec 2008)
New Revision: 8705

Modified:
   trunk/Catalyst-Plugin-FillInForm/lib/Catalyst/Plugin/FillInForm.pm
Log:
updated docs to show short-circuiting of RenderView if there is a response body already; minor updates

Modified: trunk/Catalyst-Plugin-FillInForm/lib/Catalyst/Plugin/FillInForm.pm
===================================================================
--- trunk/Catalyst-Plugin-FillInForm/lib/Catalyst/Plugin/FillInForm.pm	2008-12-03 16:08:07 UTC (rev 8704)
+++ trunk/Catalyst-Plugin-FillInForm/lib/Catalyst/Plugin/FillInForm.pm	2008-12-03 17:25:35 UTC (rev 8705)
@@ -17,10 +17,10 @@
 
     # OR, manually:
 
-    # in MyApp.pm; assume $c->stash->data is seeded elsewhere
+    # in Controller/Root.pm; assume $c->stash->data is seeded elsewhere
     sub end : Private {
       my ( $self, $c ) = @_;
-      $c->forward('MyApp::V::TT') unless $c->res->output;
+      $c->forward('MyApp::View::TT') unless $c->res->output;
       $c->fillform( $c->stash->data );
       # ....
 
@@ -117,8 +117,8 @@
 =head1 NOTES
 
 This class does not play well with Catalyst's ActionClass('RenderView')
-so you may want to check your C<end> method (in MyApp.pm or perhaps
-Controller/Root.pm). If it looks like this:
+so you may want to check your C<end> method (in Controller/Root.pm or perhaps
+MyApp.pm). If it looks like this:
 
      sub end : ActionClass('RenderView') {}
 
@@ -127,13 +127,14 @@
      sub end : Private {
         my ($self, $c) = @_;
         $c->forward('render');
-        $c->fillform($c->req->params);
+        $c->fillform($c->req->params) unless $c->res->output;
      }
+
      sub render : ActionClass('RenderView') { }
 
 =head1 SEE ALSO
 
-L<Catalyst>, L<Catalyst::Plugin::FormValidator>, L<HTML::FillInForm>.
+L<Catalyst>, L<Catalyst::Plugin::FormValidator>, L<HTML::FillInForm>, L<Catalyst::Action::RenderView>.
 
 =head1 AUTHOR
 




More information about the Catalyst-commits mailing list