Branch Coverage

lib/B/DeparseTree/PP.pm
Criterion Covered Total %
branch 102 210 48.5


line true false branch
175 8 8 unless *{$_;}{'CODE'}
188 6 21 if ($hints and $hints != $feature::hint_mask) { }
7 14 elsif ($hints) { }
246 0 1 if $op->flags & 128
250 0 1 $quoted ? :
252 0 1 if $i > 127
270 3 0 $op->first->sibling->isa('B::NULL') ? :
272 0 3 if ($self->pure_string($child))
287 0 3 if ($code =~ s/^((?:CORE::)?do) \{/$1({/)
296 0 0 if $glob->name eq 'rv2gv'
300 0 0 $scope ? :
328 27 0 if ($cx <= 4) { }
339 0 0 if (not B::Deparse::null($op->first) and $op->first->name eq 'null' and $op->first->targ == 157) { }
354 0 4 unless (B::Deparse::null($kid->sibling))
363 0 0 if ($op->flags & 128) { }
384 0 2 if ($op->flags & 128) { }
389 0 2 if not $parens and substr($fh, 0, 1) eq '('
394 2 0 if ($parens) { }
410 0 2 $op->flags & 128 ? :
413 2 0 if ($keyword =~ /^CORE::/ or $kid->name ne 'const')
417 2 0 if ($text =~ /^\$?(\w|::|\`)+$/ or $text =~ /[<>]/) { }
423 0 2 if ($cx >= 5 or $self->{'parens'}) { }
453 0 0 if ($op->private & 64) { }
454 0 0 if ($op->flags & 128)
460 0 0 if ($op->flags & 128) { }
479 0 0 if ($op->private & 64) { }
0 0 elsif ($op->flags & 128) { }
521 1 3242 if (class($kid) eq 'NULL')
536 2586 3164 if (not $lop->private & 192 || $lop->name eq 'undef' or $lop->name =~ /^(?:entersub|exit|open|split)\z/)
543 3141 23 if ($lop->name =~ /^pad[ash]v$/) { }
12 11 elsif ($lop->name =~ /^(gv|rv2)[ash]v$/ and $lop->private & 64 or $lop->name eq 'null' and $lop->first->name eq 'gvsv' and $lop->first->private & 64) { }
2 18 elsif ($lop->name ne 'undef' and not $lop->name eq 'sort' && $lop->flags & 4) { }
544 10 3131 if ($lop->private & 64) { }
545 0 10 if $local =~ /^(?:local|our|my)$/
548 0 3131 if $local =~ /^(?:local|our|state)$/
555 0 12 if $local =~ /^(?:my|local|state)$/
563 0 2 if $local =~ /^(?:my|our|state)$/
567 8 3234 if $local eq 'either'
568 2566 676 if (B::Deparse::null($kid->sibling) and not $local)
575 3156 85 if ($local) { }
576 14 3142 if (class($kid) eq 'UNOP' and $kid->first->name eq 'gvsv') { }
591 648 28 if ($local) { }
614 2 0 if ($kid->name eq 'null')
617 0 2 if ($anoncode->name eq 'anonconst')
620 2 0 if ($anoncode->name eq 'anoncode' or not B::Deparse::null($anoncode = $kid->sibling) and $anoncode->name eq 'anoncode') { }
0 0 elsif ($kid->name eq 'pushmark') { }
626 0 0 if ($sib_name =~ /^enter(xs)?sub/)
630 0 0 if ($self->{'parens'} or $kid->sibling->private & 8)
646 0 2 $op->flags & 128 ? :
647 0 2 if (class($op) eq 'UNOP' and $op->first->name eq 'const' and $op->first->private & 64) { }
656 0 2 $op->first->name eq 'const' && $op->first->private & 2 ? :
681 0 0 unless ($cx < 1 and (B::Deparse::is_scope($true) and $true->name ne 'null') and B::Deparse::is_scope($false) || B::Deparse::is_ifelse_cont($false) and $self->{'expand'} < 7)
706 0 0 if ($newcond->name eq 'lineseq')
718 0 0 if $i
720 0 0 unless (B::Deparse::null($false))
733 0 86 if ($op->private & 0)
748 2 574 unless B::Deparse::null($op->first->sibling)
753 0 574 if ($op->flags & 128 and not $op->flags & 32) { }
0 574 elsif ($op->private & 8) { }
770 0 574 if (B::Deparse::is_scope($kid)) { }
574 0 elsif ($kid->first->name eq 'gv') { }
0 0 elsif (B::Deparse::is_scalar($kid->first) and $kid->first->name ne 'rv2cv') { }
778 540 34 if (class($gv) eq 'GV' and class($cv = $gv->CV) ne 'SPECIAL' or $gv->FLAGS & 2048 and class($cv = $gv->RV) eq 'CV')
780 1 539 if $cv->FLAGS & 1024
786 0 574 if ($self->lex_in_scope("&$kid") or $self->lex_in_scope("&$kid", 1)) { }
574 0 elsif (not $amper) { }
791 0 574 if ($subname_info->{'text'} eq 'main::') { }
794 0 574 if (not $kid =~ /::/ and $kid ne 'x')
799 0 0 if (exists $feature_keywords{$kid}) { }
0 0 elsif (do { local $@; local $SIG{'__DIE__'}; eval { do { () = prototype "CORE::$kid"; 1 } } }) { }
800 0 0 if $self->feature_enabled($kid)
807 0 574 unless ($subname_info->{'text'} =~ /^(?:\w|::)(?:[\w\d]|::(?!\z))*\z/)
816 0 0 B::Deparse::is_subscriptable($kid->first) || $kid->first->name eq 'padcv' ? :
836 0 574 if (not $declared and defined $proto)
844 1 573 if ($declared and defined $proto and not $amper) { }
847 0 1 if ($amper eq '&') { }
850 1 0 if @$args
857 0 574 if ($prefix or $amper) { }
858 0 0 if ($sub_name eq '&')
863 0 0 if ($op->flags & 64) { }
875 1 573 defined $proto ? :
876 573 1 if (not $declared) { }
0 1 elsif ($dproto =~ /^\s*\z/) { }
0 1 elsif ($dproto eq '$' and B::Deparse::is_scalar($exprs[0])) { }
1 0 elsif ($dproto ne '$' and defined $proto || $simple) { }
879 379 194 @nodes > 0 ? :
881 0 573 if ($self->dedup_func_parens(\@nodes)) { }
895 573 0 if ($subname_info and $other_ops)
940 0 0 if ($subname_info and $other_ops)
955 4 8 $_[1]->private & 8 ? :
966 0 0 $flip->flags & 128 ? :
991 0 5255 $] < 5.022 ? :
1027 0 6 if ($first_kid->name eq 'rv2gv')
1031 0 4 if (B::Deparse::is_scalar($kid) and $] < 5.021 || $op->flags & 128)
1035 0 0 if ($kid_node->{'text'} eq 'ARGV') { }
1036 0 0 if (@other_ops) { }
1062 0 0 $] < 5.022 ? :
1066 0 18 $] < 5.022 ? :
1074 0 6 if ($op->private & 16)
1097 6 0 if ($class eq 'PVOP') { }
0 0 elsif ($class eq 'PADOP') { }
1106 1 5 if $priv_flags & 32
1107 1 5 if $priv_flags & 128
1108 4 2 if $from eq $to and $flags eq ''
1109 1 5 if $priv_flags & 8