Branch Coverage

lib/Hash/Flatten.pm
Criterion Covered Total %
branch 84 96 87.5


line true false branch
31 21 17 unless ref $options eq 'HASH'
39 30 8 unless defined $$self{'EscapeSequence'} and length $$self{'EscapeSequence'} > 0
40 2 36 if $$self{'DisableEscapes'}
43 1 37 if $$self{'HashDelimiter'} =~ /\Q$$self{'EscapeSequence'}\E/
44 1 36 if $$self{'ArrayDelimiter'} =~ /\Q$$self{'EscapeSequence'}\E/
53 24 24 if (ref $_[0] ne 'Hash::Flatten')
58 1 23 unless UNIVERSAL::isa($hashref, 'HASH')
73 13 13 if (ref $_[0] ne 'Hash::Flatten')
78 1 12 unless UNIVERSAL::isa($hashref, 'HASH')
86 11 1 if ($$self{'EscapeSequence'})
97 57 1 scalar(@levels) % 2 ? :
103 29 38 if ($type eq $$delim{'HASH'}) { }
38 0 elsif ($type eq $$delim{'ARRAY'}) { }
105 25 4 if (UNIVERSAL::isa($ptr, 'HASH')) { }
106 12 13 unless exists $$ptr{$key}
109 4 0 unless defined $$ptr[$key]
115 29 9 if (UNIVERSAL::isa($ptr, 'HASH')) { }
116 10 19 unless exists $$ptr{$key}
119 3 6 unless defined $$ptr[$key]
129 33 25 if (UNIVERSAL::isa($ptr, 'HASH')) { }
148 7 106 if (UNIVERSAL::isa($v, 'REF'))
153 26 86 if (UNIVERSAL::isa($v, 'HASH')) { }
14 72 elsif (UNIVERSAL::isa($v, 'ARRAY')) { }
3 69 elsif (UNIVERSAL::isa($v, 'GLOB')) { }
7 62 elsif (UNIVERSAL::isa($v, 'SCALAR')) { }
177 0 14 if ($$self{'RECURSE_CHECK'}{_stringify_ref($rscalar)}++)
182 6 8 if (defined $$self{'OnRefRef'})
183 4 2 if (ref $$self{'OnRefRef'} eq 'CODE') { }
1 1 elsif ($$self{'OnRefRef'} eq 'warn') { }
1 0 elsif ($$self{'OnRefRef'} eq 'die') { }
203 2 47 if ($$self{'RECURSE_CHECK'}{_stringify_ref($hashref)}++)
214 38 41 defined $prefix ? :
224 1 13 if ($$self{'RECURSE_CHECK'}{_stringify_ref($arrayref)}++)
232 34 0 defined $prefix ? :
242 2 5 if (defined $$self{'OnRefScalar'})
243 1 1 if (ref $$self{'OnRefScalar'} eq 'CODE') { }
0 1 elsif ($$self{'OnRefScalar'} eq 'warn') { }
1 0 elsif ($$self{'OnRefScalar'} eq 'die') { }
258 2 1 if (defined $$self{'OnRefGlob'})
259 1 1 if (ref $$self{'OnRefGlob'} eq 'CODE') { }
0 1 elsif ($$self{'OnRefGlob'} eq 'warn') { }
1 0 elsif ($$self{'OnRefGlob'} eq 'die') { }
274 3 76 unless $eseq
275 0 76 unless ref $delim eq 'ARRAY'
278 0 228 unless defined $char and length $char
288 6 119 unless $eseq
301 0 77 unless ref $ref
302 2 75 if overload::Overloaded($ref)