File Coverage

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


line stmt bran cond sub pod time code
1             package Path::Dispatcher::Rule::Intersection;
2 32     32   146 use Any::Moose;
  32         38  
  32         145  
3             extends 'Path::Dispatcher::Rule';
4              
5             with 'Path::Dispatcher::Role::Rules';
6              
7             sub _match {
8 6     6   5 my $self = shift;
9 6         6 my $path = shift;
10              
11 6         14 my @rules = $self->rules;
12 6 100       16 return if @rules == 0;
13              
14 5         10 for my $rule (@rules) {
15 8 100       31 return unless $rule->match($path);
16             }
17              
18 2         6 return {};
19             }
20              
21             __PACKAGE__->meta->make_immutable;
22 32     32   15577 no Any::Moose;
  32         63  
  32         107  
23              
24             1;
25              
26             __END__