File: TestMatchCaptures.pm

package info (click to toggle)
libcatalyst-perl 5.90015-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,352 kB
  • sloc: perl: 16,643; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package TestApp::Action::TestMatchCaptures;

use Moose;

extends 'Catalyst::Action';

sub match_captures {
    my ($self, $c, $cap) = @_;
    if ($cap->[0] eq 'force') {
        $c->res->header( 'X-TestAppActionTestMatchCaptures', 'forcing' );
        return 1;
    } else {
        $c->res->header( 'X-TestAppActionTestMatchCaptures', 'fallthrough' );
        return 0;
    }
}

1;