Branch Coverage

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


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