X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=t%2Flib%2FRestTest%2FController%2FAPI%2FREST%2FStashedClass.pm;fp=t%2Flib%2FRestTest%2FController%2FAPI%2FREST%2FStashedClass.pm;h=804e7ae5c968c909e560d201eeeea65c863d45fc;hp=0000000000000000000000000000000000000000;hb=07b00970f381c386ff40e4f13d5ab3c8bcf72c43;hpb=88d300e45ee7a34f351e25b416a4403df1d09813 diff --git a/t/lib/RestTest/Controller/API/REST/StashedClass.pm b/t/lib/RestTest/Controller/API/REST/StashedClass.pm new file mode 100644 index 0000000..804e7ae --- /dev/null +++ b/t/lib/RestTest/Controller/API/REST/StashedClass.pm @@ -0,0 +1,13 @@ +package RestTest::Controller::API::REST::StashedClass; +use Moose; +BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' } + +use namespace::autoclean; + +sub setup :Chained('/api/rest/rest_base') :CaptureArgs(1) :PathPart('stashedclass') { + my ($self, $c, $class) = @_; + $c->stash->{class} = $class; + $self->next::method($c); +} + +1;