File Coverage

blib/lib/Path/Dispatcher/Rule/Chain.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Path::Dispatcher::Rule::Chain;
2              
3             our $VERSION = '1.07';
4              
5 31     31   236 use Moo;
  31         72  
  31         178  
6             extends 'Path::Dispatcher::Rule::Always';
7              
8             around payload => sub {
9             my $orig = shift;
10             my $self = shift;
11             my $payload = $self->$orig(@_);
12              
13             if (!@_) {
14             return sub {
15             $payload->(@_);
16             die "Path::Dispatcher next rule\n"; # FIXME From Path::Dispatcher::Declarative... maybe this should go in a common place?
17             };
18             }
19              
20             return $payload;
21             };
22              
23             __PACKAGE__->meta->make_immutable;
24 31     31   12951 no Moo;
  31         93  
  31         147  
25              
26             1;
27              
28             __END__