X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FActions.pod;h=0e0bb194ff90c2d7c1548c6183ae4d2d7bbb1865;hp=38288bb085af39ae4a2b003a59d079e7262915a9;hb=7ce05098c9b1df9078e709e5a724e821a3b3b00d;hpb=46a5f2f5cf41f746d2a20ce0b64b6112f5283ac3 diff --git a/lib/Catalyst/Manual/Actions.pod b/lib/Catalyst/Manual/Actions.pod index 38288bb..0e0bb19 100644 --- a/lib/Catalyst/Manual/Actions.pod +++ b/lib/Catalyst/Manual/Actions.pod @@ -1,6 +1,6 @@ =head1 NAME -Catalyst::Manual::Actions - Catalyst Reusable Actions +Catalyst::Manual::Actions - Catalyst Reusable Actions =head1 DESCRIPTION @@ -17,7 +17,7 @@ them. This is pretty simple. Actions work just like the normal dispatch attributes you are used to, like Local or Private: - sub Hello :Local :ActionClass('SayBefore') { + sub Hello :Local :ActionClass('SayBefore') { $c->res->output( 'Hello '.$c->stash->{what} ); } @@ -38,7 +38,7 @@ the Action class: package Catalyst::Action::MyAction; use Moose; use namespace::autoclean; - + extends 'Catalyst::Action'; before 'execute' => sub { @@ -46,7 +46,7 @@ the Action class: $c->stash->{what} = 'world'; }; - after 'extecute' => sub { + after 'execute' => sub { my ( $self, $controller, $c, $test ) = @_; $c->stash->{foo} = 'bar'; }; @@ -75,7 +75,7 @@ would make the example above look like this: my ( $self, $controller, $c, $test ) = @_; $c->stash->{foo} = 'bar'; }; - + 1; and this would be used in a controller like this: @@ -95,7 +95,7 @@ and this would be used in a controller like this: =head2 Catalyst::Action::RenderView -This is meant to decorate end actions. It's similar in operation to +This is meant to decorate end actions. It's similar in operation to L, but allows you to decide on an action level rather than on an application level where it should be run.