Implemented match_captures
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / ActionRole / TestMatchCaptures.pm
CommitLineData
1279064a 1package TestApp::ActionRole::TestMatchCaptures;
2
3use Moose::Role;
4use namespace::autoclean;
5
6sub match_captures {
7 my ($self, $c, $cap) = @_;
8 if ($cap->[0] eq 'force') {
9 $c->res->header( 'X-TestAppActionTestMatchCaptures', 'forcing' );
10 return 1;
11 } else {
12 $c->res->header( 'X-TestAppActionTestMatchCaptures', 'fallthrough' );
13 return 0;
14 }
15}
16
171;