Branch Coverage

blib/lib/Data/Dump/Ruby.pm
Criterion Covered Total %
branch 88 142 61.9


line true false branch
70 0 36 if (%Data::Dump::Ruby::require)
76 1 35 if (%Data::Dump::Ruby::refcnt)
80 1 0 if ($Data::Dump::Ruby::refcnt{$name})
91 0 3 @Data::Dump::Ruby::fixup ? :
3 33 if $paren
92 1 0 !$paren && $_ == @dump - 1 ? :
46 1 defined $dump[$_][1] ? :
96 3 33 if $paren
98 1 35 if (%Data::Dump::Ruby::refcnt or %Data::Dump::Ruby::require)
107 0 36 unless defined wantarray
129 18 61 $ref ? :
135 79 0 if (overload::StrVal($rval) =~ /^(?:([^=]+)=)?([A-Z]+)\(0x([^\)]+)\)$/) { }
142 0 79 if ($] < 5.008 and $type eq 'SCALAR')
143 0 0 if $ref eq 'REF'
145 0 79 if $Data::Dump::Ruby::DEBUG
147 79 0 unless ($dont_remember)
148 1 78 if (my $s = $Data::Dump::Ruby::seen{$id})
153 0 1 if $Data::Dump::Ruby::DEBUG
154 0 1 unless $sname eq $name
157 0 1 if @$idx and $$idx[-1] eq '$'
165 69 9 if ($type eq 'SCALAR' or $type eq 'REF' or $type eq 'REGEXP') { }
0 9 elsif ($type eq 'GLOB') { }
1 8 elsif ($type eq 'ARRAY') { }
8 0 elsif ($type eq 'HASH') { }
0 0 elsif ($type eq 'CODE') { }
166 8 61 if ($ref) { }
167 8 0 if ($class and $class eq 'Regexp') { }
171 8 0 if ($v =~ /^\(\?\^?([msix-]*):([\x00-\xFF]*)\)\z/)
176 2 0 $1 eq 's' ? :
1 2 $1 eq 'm' ? :
182 4 4 if ($sep_count)
187 3 7 if ($c < $sep_count)
190 3 0 if $sep_count == 0
201 0 0 if $type eq 'SCALAR'
203 0 0 $class ? :
206 2 59 if (not defined $$rval) { }
40 19 elsif ($$rval =~ /^-?[1-9]\d{0,9}\z/ or $$rval eq '0') { }
215 0 61 if ($class and not @$idx)
227 0 0 if ($ref) { }
231 0 0 if ($out =~ /^\\\*Symbol::/)
241 0 0 unless defined $gval
242 0 0 if $k eq 'SCALAR' and not defined $$gval
255 0 1 if $tied
266 0 8 if $tied
276 6 6 unless /^[-+]?(?:0|[1-9]\d*)(?:\.\d+)?\z/
279 6 2 if ($text_keys) { }
288 24 3 unless $key =~ /^-?[1-9]\d{0,8}\z/
293 13 14 if length $key > $kstat_max
303 0 5 if (length $tmp > 60 or $tmp =~ /\n/ or $tied)
307 1 2 if ($kstat_max < 4) { }
2 0 elsif (@keys >= 2) { }
316 1 1 if ($stddev / $kstat_max < 0.25)
319 0 2 if ($Data::Dump::Ruby::DEBUG)
328 0 8 if $tied
334 14 13 if $nl
337 5 3 unless $nl
348 0 78 if ($class and $ref)
357 0 9 if ($tied)
358 0 0 if (my $tied_ref = ref $tied) { }
375 0 0 if ($ref and @i and $i[0] eq '$')
386 0 1 if ($i eq '*' or $i eq '$') { }
0 1 elsif ($i =~ s/^\*//) { }
397 0 2 if $ref
406 4 33 $paren ? :
408 0 37 if ($comment or @_ > $indent_lim and length $tmp > 60 || $tmp =~ /\n/) { }
411 0 0 $comment ? :
419 9 10 if (length $_[0] > 30)
422 4 5 if (/^(.)\1\1\1/s)
425 4 0 unless (/[^\Q$1\E]/)
432 2 3 if (length $_ < 16384 and /^(.{2,5}?)\1*\z/s)
478 37 12 unless /[^\040-\176]/