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 32     32   133 use Any::Moose;
  32         37  
  32         147  
3             extends 'Path::Dispatcher::Rule::Always';
4              
5             override payload => sub {
6             my $self = shift;
7             my $payload = super;
8              
9             if (!@_) {
10             return sub {
11             $payload->(@_);
12             die "Path::Dispatcher next rule\n"; # FIXME From Path::Dispatcher::Declarative... maybe this should go in a common place?
13             };
14             }
15              
16             return $payload;
17             };
18              
19             __PACKAGE__->meta->make_immutable;
20 32     32   15234 no Any::Moose;
  32         54  
  32         548  
21              
22             1;
23