Branch Coverage

lib/B/DeparseTree/TreeMain.pm
Criterion Covered Total %
branch 123 346 35.5


line true false branch
129 24 96 unless *{$_;}{'CODE'}
175 0 0 if ($arg eq '-d') { }
0 0 elsif ($arg =~ /^-f(.*)/) { }
0 0 elsif ($arg eq '-l') { }
0 0 elsif ($arg eq '-a') { }
0 0 elsif ($arg eq '-p') { }
0 0 elsif ($arg eq '-P') { }
0 0 elsif ($arg eq '-q') { }
0 0 elsif (substr($arg, 0, 2) eq '-s') { }
0 0 elsif ($arg =~ /^-x(\d)$/) { }
219 124 1278 defined $self->{'ambient_warnings'} ? :
222 0 1402 if $] < 5.009
249 0 1328 if ($gv->NAME eq 'main') { }
252 0 1328 unless UNIVERSAL::isa($coderef, 'CODE')
263 0 64 if ($func eq 'main::main') { }
266 0 64 unless UNIVERSAL::isa($func, 'CODE')
276 0 91 if ($self->{'use_dumper'})
279 0 91 if (class($sv) eq 'SPECIAL')
284 0 91 if (class($sv) eq 'NULL')
288 0 91 if ($sv->FLAGS & 8388608)
290 0 0 if ($mg->TYPE eq 'V')
297 62 29 if ($sv->FLAGS & 256) { }
0 29 elsif ($sv->FLAGS & 512) { }
0 29 elsif ($sv->FLAGS & 2048 and $sv->can('RV')) { }
29 0 elsif ($sv->FLAGS & 1024) { }
299 0 62 if $str < 0
303 0 0 if ($nv == 0) { }
0 0 elsif (1 / $nv == 0) { }
0 0 elsif ($nv != $nv) { }
304 0 0 if (pack('F', $nv) eq "\000\000\000\000\000\000\000\000") { }
316 0 0 if ($nv > 0) { }
329 0 0 if (pack('F', $nv) eq "\000\000\000\000\000\000\370\377") { }
0 0 elsif (pack('F', $nv) eq "\000\000\000\000\000\000\370\177") { }
345 0 0 if ($str != $nv)
349 0 0 if ($str != $nv)
357 0 0 if $nv < 0
361 0 0 if (class($ref) eq 'AV') { }
0 0 elsif (class($ref) eq 'HV') { }
0 0 elsif (class($ref) eq 'CV') { }
375 8 0 if ($] > 5.0150051)
380 0 0 if ($] > 5.0150051 and $self->{'curcv'} and $self->{'curcv'}->object_2svref == $ref->object_2svref)
390 0 0 if ($ref->FLAGS & 4194304)
392 0 0 if ($mg->TYPE eq 'r')
400 0 0 if ($self->{'in_subst_repl'} and $const =~ /^[0-9]/)
409 0 29 if ($str =~ /[[:^print:]]/) { }
428 0 0 if ($str =~ /^\$v/) { }
444 0 0 if B::Deparse::null($op->first)
462 0 0 if $parent
467 0 0 if (exists $info->{'other_ops'}) { }
483 4 2097 if ($addr and not exists $self->{'optree'}{$addr})
484 4 0 if $op
497 2087 1 if (B::Deparse::is_state($kids[$i]))
501 0 2087 if ($fix_cop)
505 0 2087 if ($i > $#kids)
509 0 2088 if (B::Deparse::is_for_loop($kids[$i]))
510 0 0 if $ENV{'DEBUG_DEPARSETREE'}
512 0 0 $kids[$i]->sibling->name eq 'unstack' ? :
523 759 1329 unless (exists $expr->{'prev_expr'})
527 0 2088 if ($fix_cop)
533 0 2088 if (B::class($op) eq 'COP' and not $expr->{'text'}) { }
556 14 1328 defined $out_cop ? :
558 1342 0 if (defined $root)
561 0 1342 if ${$root->sibling;}
562 1328 14 if not defined $limit_seq or defined $nseq and $nseq < $limit_seq
567 2 0 if defined $self->{'limit_seq'} and !defined($limit_seq) || $self->{'limit_seq'} < $limit_seq
573 0 4175 unless $info->{'type'}
576 4175 0 if ($parent)
577 0 4175 unless ref $parent
596 0 12558 unless $$startop
608 827 23883 if ($ppname eq 'padrange')
631 4 20 if (class($op) eq 'PMOP' and ref $op->pmreplroot and ${$op->pmreplroot;} and $op->pmreplroot->isa('B::OP'))
639 11224 13486 if ($op->flags & 4)
654 14 1455 unless $$startop
655 0 1455 if $$visited{$$startop}
658 121 12770 if $$visited{$$op}
665 116 12654 if ($ppname =~ /^((and|d?or)(assign)?|(map|grep)while|range|cond_expr|once)$/) { }
18 12636 elsif ($ppname eq 'subst') { }
5 12631 elsif ($ppname =~ /^(enter(loop|iter))$/) { }
709 0 0 if ($opt eq 'C') { }
0 0 elsif ($opt eq 'i') { }
0 0 elsif ($opt eq 'T') { }
0 0 elsif ($opt eq 'v') { }
733 0 0 if (defined $ar->[1]) { }
734 0 0 if (ref $ar->[1]) { }
763 0 0 if (defined $^I)
766 0 0 if ($^W)
769 0 0 if ($/ ne "\n" or defined $O::savebackslash)
774 0 0 B::begin_av()->isa('B::AV') ? :
775 0 0 B::unitcheck_av()->isa('B::AV') ? :
778 0 0 B::check_av()->isa('B::AV') ? :
779 0 0 B::init_av()->isa('B::AV') ? :
780 0 0 B::end_av()->isa('B::AV') ? :
781 0 0 if ($] < 5.02) { }
798 0 0 if ($self->{'curcop'})
815 0 0 if ($] < 5.021) { }
816 0 0 unless (B::Deparse::null($root))
822 0 0 unless (B::Deparse::null($root))
832 0 0 if ($root->name eq 'leave' and ($kid = $root->first)->name eq 'enter' and not B::Deparse::null($kid = $kid->sibling) and $kid->name eq 'stub' and not B::Deparse::null($kid = $kid->sibling) and $kid->name eq 'null' and class($kid) eq 'COP' and B::Deparse::null($kid->sibling)) { }
851 0 0 if @text
856 0 0 defined $self->{'curcop'} ? :
857 0 0 if (defined *{$laststash . '::DATA';}{'IO'})
859 0 0 unless $laststash eq $self->{'curstash'}
891 0 19281 unless $op->can('name')
895 0 19281 if $ENV{'DEBUG_DEPARSETREE'}
898 4092 15189 if (exists $B::DeparseTree::PP_MAPFNS{$name}) { }
900 1664 2428 if (ref $B::DeparseTree::PP_MAPFNS{$name} eq 'ARRAY') { }
903 231 1433 if ($meth eq 'maybe_targmy') { }
907 186 45 unless @args
908 4 227 if ($op->private & 16) { }
939 0 19281 unless ref $info
940 0 19281 unless $info->isa('B::DeparseTree::TreeNode')
942 19199 82 if $parent
945 19212 69 if ($got_op) { }
946 2679 16533 if ($got_op != $op)
955 4183 15098 if ($info->{'other_ops'})
957 0 8884 if (not ref $other) { }
5501 3383 elsif ($other->isa('B::DeparseTree::TreeNode')) { }
980 0 1330 if not defined $cv or $cv->isa('B::NULL')
981 0 1330 if $cv->isa('B::SPECIAL')
986 0 1330 if ($cv->FLAGS & 1024)
989 2 1328 if ($cv->CvFLAGS & 3)
991 1 1 if $cv->CvFLAGS & 2
992 0 2 if $cv->CvFLAGS & 0
993 1 1 if $cv->CvFLAGS & 1
1007 1330 0 if (not B::Deparse::null($root)) { }
1010 1330 0 if ($lineseq->name eq 'lineseq') { }
0 0 elsif ($start_op) { }
1034 0 0 if ($$sv) { }
1050 0 1330 if ($start_op)
1110 0 0 if ($is_form) { }
1118 0 0 if ($name eq 'BEGIN')
1120 0 0 if (defined $use_dec and $self->{'expand'} < 5)
1121 0 0 if (0 == length $use_dec) { }
1129 0 0 if ($self->{'linenums'})
1134 0 0 if (class($cv->STASH) ne 'SPECIAL')
1136 0 0 if ($stash ne $self->{'curstash'})
1139 0 0 unless $name =~ /::/
1202 2087 0 if ($] >= 5.016) { }
1211 0 67 if $ignored_hints{$key}
1213 13 54 if $is_feature and not $doing_features
1214 12 42 if (not exists $from->{$key} or $from->{$key} ne $to->{$key})
1215 0 12 if ($is_cperl)
1216 0 0 if $key eq 'feature_lexsubs'
1217 0 0 if $key eq 'feature_signatures'
1219 12 0 if $is_feature
1224 0 0 defined $to->{$key} ? :
1231 0 55 if $ignored_hints{$key}
1233 13 42 if $is_feature and not $doing_features
1234 0 42 unless (exists $to->{$key})
1235 0 0 if $is_feature
1240 3 2084 if (@features or @unfeatures)
1241 1 2 unless (%rev_feature)
1243 3 2084 if (@features)
1247 0 2087 if (@unfeatures)
1253 0 2087 if @decls
1268 0 0 if ($stash ne $self->{'curstash'})
1280 0 0 if ($warnings->isa('B::SPECIAL') and $$warnings == 4) { }
0 0 elsif ($warnings->isa('B::SPECIAL') and $$warnings == 5) { }
0 0 elsif ($warnings->isa('B::SPECIAL')) { }
1293 0 0 if (defined $warning_bits and !defined($self->{'warnings'}) || $self->{'warnings'} ne $warning_bits)
1300 0 0 $] < 5.008009 ? :
1302 0 0 if ($self->{'hints'} != $hints)
1308 0 0 if ($] > 5.009)
1312 0 0 if ($] >= 5.015006)
1316 0 0 if ($from != $to)
1317 0 0 if ($to == $feature::hint_mask) { }
1318 0 0 if ($self->{'hinthash'}) { }
1337 0 0 if ($] > 5.009)
1353 2 1264 if (($to & &WARN_MASK()) eq (warnings::bits('all') & &WARN_MASK())) { }
1264 0 elsif (($to & &WARN_MASK()) eq ("\000" x length($to) & &WARN_MASK())) { }
1375 0 2087 unless defined $seq
1385 0 0 if (not $lexical and $cv and ${\0 unless $cv->OUTSIDE;} != ${$self->{'curcv'};})
1386 0 0 unless $cv->OUTSIDE