Branch Coverage

blib/lib/Router/Simple/Route.pm
Criterion Covered Total %
branch 43 46 93.4


line true false branch
14 32 9 if (@_ == 1 or ref $_[1])
19 0 41 unless $pattern
25 22 19 if (my $method = $$opt{'method'})
26 22 0 unless ref $method
32 5 36 if (my $host = $$opt{'host'})
34 0 5 ref $host ? :
42 2 39 if (ref $pattern) { }
52 28 75 if ($1) { }
7 68 elsif ($2) { }
4 64 elsif ($3) { }
55 20 8 $pattern ? :
67 4 35 if $$opt{'directory_slash'} and $pattern =~ m[\/$]
80 15 108 if ($$self{'host_re'})
81 4 11 unless ($$env{'HTTP_HOST'} =~ /$$self{'host_re'}/)
85 44 75 if (my(@captured) = $$env{'PATH_INFO'} =~ /$$self{'pattern_re'}/)
88 1 43 if ($$self{'_regexp_capture'}) { }
91 1 42 if (@{$$self{'capture'};} > 0 and scalar @{$$self{'capture'};} != scalar @captured)
100 4 43 if ($$self{'capture'}[$i] eq '__splat__') { }
107 28 16 if ($$self{'method_re'})
108 8 20 unless (($$env{'REQUEST_METHOD'} || '') =~ /$$self{'method_re'}/)
114 3 33 @splat ? :
118 3 33 if ($$self{'on_match'})
120 1 2 unless $ret