Branch Coverage

blib/lib/JavaScript/XRay.pm
Criterion Covered Total %
branch 63 108 58.3


line true false branch
72 6 1 if $args{'switches'}
79 7 0 unless $abs_uri
80 0 0 ref $abs_uri eq 'URI' ? :
86 0 6 unless keys %switches
97 0 14 unless ($SWITCHES{$switch})
104 0 14 $ref_type eq 'ARRAY' && $SWITCHES{$switch}{'ref_type'} eq 'ARRAY' ? :
112 35 13 unless $$self{'switches'}{$switch}
122 0 0 if (@methods)
125 0 0 if (not -d $method || $method eq 'HTTP_GET' || ref $method eq 'CODE') { }
138 0 0 unless (@valid_methods)
146 0 0 wantarray ? :
154 2 5 if $$switch{'anon'} and not $$switch{'only'}
157 3 4 if $$switch{'only'}
160 1 6 if $$switch{'skip'}
162 1 6 if $$switch{'match'}
168 2 4 if $$switch{'uncomment'}
207 7 28 unless $name
210 1 34 if $name eq $alias
216 7 27 unless $name
218 26 3 unless ($$switch{'no_exec_count'} or $name eq 'ANON' and not $$switch{'anon'})
226 27 7 if $name ne 'ANON'
229 14 20 $$switch{'only'} ? :
232 5 29 $$switch{'skip'} ? :
236 0 34 if (ref $$switch{'match'} eq 'Regexp') { }
5 29 elsif ($$switch{'match'}) { }
250 19 15 if ($$switch{'none'} or $name eq 'ANON' and not $$switch{'anon'} or $$switch{'only'} and not $only_function{$name} or $$switch{'skip'} and $skip_function{$name} or $$switch{'match'} and not $name =~ /$function_filter/x) { }
265 3 12 if ($args)
276 6 0 if ($work_html =~ /\G(.*)/cgs)
338 0 0 if ($defer) { }
346 0 6 if (keys %attrs and $attrs{'src'}) { }
347 0 0 $_ eq 'defer' ? :
353 0 0 if ($js) { }
374 6 0 if ($work_html =~ /\G(.*)/cgs)
385 0 0 unless ($src =~ /^http/i or $$self{'abs_uri'})
392 0 0 $src =~ /^http/ || $src =~ m[^/] && $$self{'abs_uri'} =~ m[^/] ? :
398 0 0 if ($method eq 'HTTP_GET') { }
0 0 elsif (-d $method) { }
0 0 elsif (ref $method eq 'CODE') { }
399 0 0 if $$self{'verbose'}
405 0 0 if (open my $fh, '<', $possible_js_file) { }
416 0 0 if $js
419 0 0 if ($js)
436 1 2 if ($uncomment_count)
437 0 1 $uncomment_count > 1 ? :
763 5 1 unless $$switches{'no_exec_count'}
800 6 42 if $switch eq 'all'
803 18 24 if ($SWITCHES{$switch}{'type'} eq 'bool') { }
12 12 elsif ($SWITCHES{$switch}{'type'} =~ /string/) { }
12 0 elsif ($SWITCHES{$switch}{'type'} =~ /function/) { }
804 5 13 $value ? :
906 2 10 if $$self{'css_inline'}
910 2 10 if $$self{'css_external'}
914 6 6 if ($escape_bool)
925 0 23 if $$self{'verbose'}