Branch Coverage

blib/lib/JavaScript/XRay.pm
Criterion Covered Total %
branch 52 94 55.3


line true false branch
70 6 1 if $args{'switches'}
77 7 0 unless $abs_uri
78 0 0 ref $abs_uri eq 'URI' ? :
84 0 6 unless keys %switches
95 0 14 unless ($SWITCHES{$switch})
103 0 14 $ref_type eq 'ARRAY' && $SWITCHES{$switch}{'ref_type'} eq 'ARRAY' ? :
109 35 13 unless $self->{'switches'}{$switch}
118 0 0 if (@methods)
121 0 0 if (-d $method or $method eq 'HTTP_GET' or ref $method eq 'CODE') { }
134 0 0 unless (@valid_methods)
142 0 0 wantarray ? :
151 2 5 if $switch->{'anon'} and not $switch->{'only'}
154 3 4 if $switch->{'only'}
156 1 6 if $switch->{'skip'}
159 1 6 if $switch->{'match'}
164 2 4 if $switch->{'uncomment'}
202 7 28 unless $name
205 1 34 if $name eq $alias
211 7 27 unless $name
213 26 3 unless ($switch->{'no_exec_count'} or $name eq 'ANON' and not $switch->{'anon'})
222 14 20 $switch->{'only'} ? :
225 5 29 $switch->{'skip'} ? :
228 0 34 if (ref $switch->{'match'} eq 'Regexp') { }
5 29 elsif ($switch->{'match'}) { }
242 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) { }
257 3 12 if ($args)
268 6 0 if ($work_html =~ /\G(.*)/cgs)
330 0 0 if ($defer) { }
338 0 6 if (keys %attrs and $attrs{'src'}) { }
340 0 0 $_ eq 'defer' ? :
345 0 0 if ($js) { }
366 6 0 if ($work_html =~ /\G(.*)/cgs)
377 0 0 unless ($src =~ /^http/i or $self->{'abs_uri'})
389 0 0 $src =~ /^http/ ? :
392 0 0 if ($method eq 'HTTP_GET') { }
0 0 elsif (-d $method) { }
0 0 elsif (ref $method eq 'CODE') { }
397 0 0 if (open my $fh, 'r', $possible_js_file) { }
408 0 0 if $js
411 0 0 if ($js)
428 1 2 if ($uncomment_count)
429 0 1 $uncomment_count > 1 ? :
629 5 1 unless $switches->{'no_exec_count'}
719 2 10 if $self->{'css_inline'}
725 2 10 if $self->{'css_external'}
727 6 6 if ($escape_bool)
738 0 23 if $self->{'verbose'}