Branch Coverage

blib/lib/Kelp/Routes.pm
Criterion Covered Total %
branch 46 52 88.4


line true false branch
38 2 95 unless $string
44 42 53 if $base
53 148 42 if (not ref $val or ref $val eq 'CODE')
58 1 189 if (ref $val ne 'HASH')
64 2 187 unless (exists $val->{'to'})
70 72 115 unless (ref $val->{'to'})
71 2 70 defined $val->{'to'} && $val->{'to'} =~ s/^(\+)// ? :
72 2 70 $sigil ? :
75 9 42 if (defined $val->{'to'} and $val->{'to'} =~ /^(.+)::(\w+)$/ and $1 ne 'main' and not 'Class::Inspector'->loaded($1))
84 16 170 if (ref $key eq 'ARRAY')
86 1 15 unless (grep {$method eq $_;} 'GET', 'POST', 'PUT', 'DELETE')
94 2 184 if (ref $key and ref $key ne 'Regexp')
102 7 177 if ($tree = delete $val->{'tree'})
103 0 7 if (ref $tree ne 'ARRAY') { }
114 12 172 if (%$parent)
115 7 1 if ($val->{'name'} and $parent->{'name'})
125 19 165 if (my $name = $val->{'name'})
126 0 19 if (exists $self->names->{$name})
141 0 14 @_ == 1 ? :
143 5 9 unless exists $self->names->{$name}
160 0 10 unless $b->bridge <=> $a->bridge
170 0 193 unless $app
171 0 193 unless $route
178 3 190 if (not $to or ref $to and ref $to ne 'CODE')
184 22 168 unless (ref $to)
187 3 19 unless (exists &$to)