File Coverage

blib/lib/Path/Dispatcher/Rule/CodeRef.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 13 13 100.0


line stmt bran cond sub pod time code
1             package Path::Dispatcher::Rule::CodeRef;
2 32     32   833 use Any::Moose;
  32         724  
  32         152  
3             extends 'Path::Dispatcher::Rule';
4              
5             has matcher => (
6             is => 'ro',
7             isa => 'CodeRef',
8             required => 1,
9             );
10              
11             sub _match {
12 3     3   4 my $self = shift;
13 3         5 my $path = shift;
14              
15 3         4 local $_ = $path;
16 3         23 return $self->matcher->($path);
17             }
18              
19             __PACKAGE__->meta->make_immutable;
20 32     32   14356 no Any::Moose;
  32         42  
  32         106  
21              
22             1;
23              
24             __END__