Branch Coverage

blib/lib/Mojar/Util.pm
Criterion Covered Total %
branch 38 76 50.0


line true false branch
21 2 11 if been_numeric($val) or not defined $val
23 2 7 if $val eq '1' or $val eq 'true' or $val eq 'yes' or $val eq 'on'
26 2 3 if $val eq '0' or $val eq 'false' or $val eq 'no' or $val eq 'off'
44 0 0 unless &reftype($hr) eq 'HASH'
54 0 20 unless defined $string
58 1 19 if $string =~ s/^([^A-Z]+)//
62 14 1 unless $words[$_] =~ /[^a-z]$/
70 0 27 unless defined $string
74 2 25 if $string =~ s/\A(\Q$separator\E+)//
76 2 25 if ($want_camelcase and $string =~ s/\A([^\Q$separator\E]+)\Q$separator\E?//)
79 0 2 if $string =~ s/\A(\Q$separator\E+)//
84 2 35 if $string =~ s/\A(\Q$separator\E+)//
87 1 26 if @words and $words[-1] =~ /\A\Q$separator\E/
93 5 9 ref $_[-1] eq 'CODE' ? :
94 1 13 unless defined $string
122 41 1 if (ref $ref->[0])
123 9 32 if (my(@deeper) = grep(ref($_->[0]), @$ref)) { }
142 0 0 if exists $INC{$module}
146 0 0 if exists $INC{$module}
154 1 0 if B::svref_2object(\$value)->FLAGS & 12288 and 0 + $value eq $value and $value * 0 == 0
160 1 3 ref $_[-1] eq 'ARRAY' ? :
163 0 4 unless open my $file, '>', $path
172 5 5 if @_ % 2 == 0
173 5 0 if ref $_[0] eq 'HASH' or &reftype($_[0]) eq 'HASH'
180 3 3 unless ref $requireds eq 'ARRAY'
189 0 0 if (&reftype($left) eq 'ARRAY') { }
190 0 0 if (&reftype($right) eq 'ARRAY') { }
200 0 0 if (&reftype($right) eq 'ARRAY') { }
215 0 0 unless ref $_[0]
217 0 0 unless @_
232 0 0 if ($class)
233 0 0 if ($left->can('clone')) { }
0 0 elsif ($left->can('new')) { }
0 0 elsif (ref $left eq 'HASH') { }
248 0 0 if (not @_) { }
0 0 elsif (@_ == 1 and ref $_[0]) { }
0 0 elsif (@_ > 1 and ref $_[0]) { }
0 0 elsif (@_ > 1 and @_ % 2 == 0) { }