The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
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;