1;
Modify the $c->form() parameters to match your needs, and don't forget to copy
-the templates. ;)
+the templates into the template root. Can't find the templates? They were in the
+CRUD model distribution, so you can do B<look Catalyst::Model::CDBI::CRUD> from
+the CPAN shell to find them.
=head2 Single file upload with Catalyst
=head2 Pass-through login (and other actions)
-An easy way of having assorted actions that occur during the processing of
-a request that are orthogonal to its actual purpose - logins, silent
+An easy way of having assorted actions that occur during the processing
+of a request that are orthogonal to its actual purpose - logins, silent
commands etc. Provide actions for these, but when they're required for
-something else fill e.g. a form variable __login and have a sub begin like so:
+something else fill e.g. a form variable __login and have a sub begin
+like so:
-sub begin : Private {
- my ($self, $c) = @_;
- foreach my $action (qw/login docommand foo bar whatever/) {
- if ($c->req->params->{"__${action}"}) {
- $c->forward($action);
+ sub begin : Private {
+ my ($self, $c) = @_;
+ foreach my $action (qw/login docommand foo bar whatever/) {
+ if ($c->req->params->{"__${action}"}) {
+ $c->forward($action);
+ }
+ }
}
- }
-}
=head2 How to use Catalyst without mod_perl
For more information see the FastCGI documentation, the C<FCGI> module
and L<http://www.fastcgi.com/>.
+
+=head2 Forwarding with a parameter
-=head1 Forwarding with a parameter
+Sometimes you want to pass along arguments when forwarding to another
+action. As of version 5.30, arguments can be passed in the call to
+C<forward>; in earlier versions, you can manually set the arguments in
+the Catalyst Request object:
-Sometimes you want to pass along an argument when forward to another
-action. This can easily be accomplished like this:
-
+ # version 5.30 and later:
+ $c->forward('/wherever', [qw/arg1 arg2 arg3/]);
+
+ # pre-5.30
$c->req->args([qw/arg1 arg2 arg3/]);
$c->forward('/wherever');
+(See L<Catalyst::Manual::Intro#Flow_Control> for more information on
+passing arguments via C<forward>.)
+
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>