Branch Coverage

blib/lib/Router/Simple/Route.pm
Criterion Covered Total %
branch 41 44 93.1


line true false branch
14 31 5 if (@_ == 1 or ref $_[1])
19 0 36 unless $pattern
25 19 17 if (my $method = $$opt{'method'})
26 19 0 unless ref $method
32 5 31 if (my $host = $$opt{'host'})
34 0 5 ref $host ? :
42 2 34 if (ref $pattern) { }
52 23 61 if ($1) { }
5 56 elsif ($2) { }
4 52 elsif ($3) { }
55 17 6 $pattern ? :
78 15 76 if ($$self{'host_re'})
79 4 11 unless ($$env{'HTTP_HOST'} =~ /$$self{'host_re'}/)
83 33 54 if (my(@captured) = $$env{'PATH_INFO'} =~ /$$self{'pattern_re'}/)
86 1 32 if ($$self{'_regexp_capture'}) { }
89 1 31 if (@{$$self{'capture'};} > 0 and scalar @{$$self{'capture'};} != scalar @captured)
98 4 25 if ($$self{'capture'}[$i] eq '__splat__') { }
105 20 13 if ($$self{'method_re'})
106 6 14 unless (($$env{'REQUEST_METHOD'} || '') =~ /$$self{'method_re'}/)
112 3 24 @splat ? :
116 3 24 if ($$self{'on_match'})
118 1 2 unless $ret