X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FAction.pm;h=6cee5f5ccbea8bb1f24efc7803a0797bc9188f72;hb=7d81af7e1358baaee20d748f36b85791378c30ae;hp=9532a6983fece86f56c3e672a44c0edf9c0320a6;hpb=734a1e11822a80e23e338a0167c717c5b31171f2;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Action/Action.pm b/t/lib/TestApp/Controller/Action/Action.pm index 9532a69..6cee5f5 100644 --- a/t/lib/TestApp/Controller/Action/Action.pm +++ b/t/lib/TestApp/Controller/Action/Action.pm @@ -3,6 +3,18 @@ package TestApp::Controller::Action::Action; use strict; use base 'TestApp::Controller::Action'; +__PACKAGE__->config( + actions => { + '*' => { extra_attribute => 13 }, + action_action_five => { ActionClass => '+Catalyst::Action::TestBefore' }, + action_action_eight => { another_extra_attribute => 'foo' }, + }, + action_args => { + '*' => { extra_arg => 42 }, + action_action_seven => { another_extra_arg => 23 }, + }, +); + sub action_action_one : Global : ActionClass('TestBefore') { my ( $self, $c ) = @_; $c->res->header( 'X-Action', $c->stash->{test} ); @@ -20,4 +32,30 @@ sub action_action_three : Global : ActionClass('+TestApp::Action::TestBefore') { $c->forward('TestApp::View::Dump::Request'); } +sub action_action_four : Global : MyAction('TestMyAction') { + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Request'); +} + +sub action_action_five : Global { + my ( $self, $c ) = @_; + $c->res->header( 'X-Action', $c->stash->{test} ); + $c->forward('TestApp::View::Dump::Request'); +} + +sub action_action_six : Global : ActionClass('~TestMyAction') { + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Request'); +} + +sub action_action_seven : Global : ActionClass('~TestExtraArgsAction') { + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Request'); +} + +sub action_action_eight : Global { + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Action'); +} + 1;