Implemented match_captures
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / ActionRole / TestMatchCaptures.pm
1 package TestApp::ActionRole::TestMatchCaptures;
2
3 use Moose::Role;
4 use namespace::autoclean;
5
6 sub 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
17 1;