File Coverage

blib/lib/Path/Dispatcher/Rule/Dispatch.pm
Criterion Covered Total %
statement 9 13 69.2
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 18 72.2


line stmt bran cond sub pod time code
1             package Path::Dispatcher::Rule::Dispatch;
2             # ABSTRACT: redispatch
3              
4             our $VERSION = '1.07';
5              
6 31     31   272 use Moo;
  31         75  
  31         188  
7 31     31   9803 use Type::Utils qw(class_type);
  31         107  
  31         273  
8              
9             extends 'Path::Dispatcher::Rule';
10              
11             has dispatcher => (
12             is => 'ro',
13             isa => class_type("Path::Dispatcher"),
14             required => 1,
15             handles => ['rules', 'complete'],
16             );
17              
18             sub match {
19 0     0 1   my $self = shift;
20 0           my $path = shift;
21              
22 0           my $dispatch = $self->dispatcher->dispatch($path);
23 0           return $dispatch->matches;
24             }
25              
26             __PACKAGE__->meta->make_immutable;
27 31     31   21841 no Moo;
  31         559  
  31         202  
28              
29             1;
30              
31             __END__