Branch Coverage

blib/lib/Router/Generic.pm
Criterion Covered Total %
branch 73 100 73.0


line true false branch
43 0 1046 unless defined $args{'path'} and length $args{'path'}
46 0 1046 unless defined $args{'target'} and length $args{'target'}
49 0 1046 unless defined $args{'name'} and length $args{'name'}
52 1 1045 if exists $$s{'names'}{$args{'name'}}
55 4 1041 if exists $$s{'paths_methods'}{$uid}
58 0 1041 if exists $$s{'paths_methods'}{$starUID}
69 1 1040 if (my $exists = $$s{'patterns'}{$regUID})
88 0 0 unless eval { do { $s->uri_for($args{'name'}) } }
109 1010 1098 if ($1) { }
24 1074 elsif ($2) { }
21 1053 elsif ($3) { }
1053 0 elsif ($4) { }
113 1010 0 $pattern ? :
123 10 11 if ($part =~ /^\*/) { }
142 1031 10 unless ($copy =~ m[\/[^/]+\.[^/]+$])
144 1021 10 unless $copy =~ m[/$]
158 1010 1098 if ($1) { }
24 1074 elsif ($2) { }
21 1053 elsif ($3) { }
1053 0 elsif ($4) { }
170 10 11 if ($part =~ /^\*/) { }
186 1040 1 unless ($copy =~ m[\/[^/]+\.[^/]+$])
188 1030 10 unless $copy =~ m[/$]
210 1001 1041 if (exists $$s{'cache'}{"$method $full_uri"})
212 1 1000 if (ref $$s{'cache'}{"$method $full_uri"}) { }
214 1 0 wantarray ? :
218 0 1000 unless defined $$s{'cache'}{"$method $full_uri"}
223 3 1000152 unless $method eq '*' or $$_{'method'} eq $method
225 1040 499585 if (my(@captured) = $uri =~ /$$route{'regexp'}/)
227 1 1039 if (ref $$route{'target'} eq 'ARRAY') { }
234 0 1 wantarray ? :
252 1040 1 unless defined $querystring
257 1053 0 @captured ? :
260 10 1043 unless length $value
262 28 1025 if exists $defaults{$_}
270 1050 0 if defined $$values{$_}
273 2 0 if defined $defaults{$_}
274 3 0 if defined $defaults{$_}
279 0 1041 if ($target =~ /\?/) { }
281 0 0 $params ? :
285 1036 5 $params ? :
295 0 1024 unless my $route = $$s{'names'}{$name}
299 22 6 unless defined $$args{$_}
308 1034 5 if (defined $$args{$_} and length $$args{$_}) { }
320 1036 4 if defined $$args{$_} and length $$args{$_}
323 2 1022 if (length $params)
325 0 2 $template =~ /\?/ ? :
339 0 0 unless ($uri) = split(/\?/, $uri, 2)
342 0 0 unless $method eq '*' or $$_{'method'} eq $method
344 0 0 if (my(@captured) = $uri =~ /$$route{'regexp'}/)