Branch Coverage

blib/lib/Devel/Examine/Subs.pm
Criterion Covered Total %
branch 271 286 94.7


line true false branch
33 58 0 if (not defined &Devel::Examine::Subs::trace)
46 3 144 if ($ENV{'DES_TRACE'})
51 3 144 if $ENV{'TRACE'}
69 2 25 if $ENV{'TRACE'}
80 2 47 if $ENV{'TRACE'}
92 2 6 if $ENV{'TRACE'}
103 2 6 if $ENV{'TRACE'}
110 5 2 if ($self->{'params'}{'search'} or $p->{'search'})
118 2 10 if $ENV{'TRACE'}
126 4 7 if (@_ == 1) { }
147 2 13 if $ENV{'TRACE'}
159 2 6 if $ENV{'TRACE'}
173 2 7 if $ENV{'TRACE'}
185 2 6 if $ENV{'TRACE'}
190 3 1 unless ($p->{'injects'} or $self->{'params'}{'injects'})
202 2 6 if $ENV{'TRACE'}
208 5 1 if ($p->{'inject_use'} or $p->{'inject_after_sub_def'} or defined $p->{'line_num'})
216 2 1 if $ENV{'TRACE'}
227 2 2 if $ENV{'TRACE'}
231 1 2 if ($self->{'params'}{'directory'})
239 0 2 if $ENV{'TRACE'}
244 2 0 if defined $state
254 2 5 if $ENV{'TRACE'}
273 5 10 if ($_ eq $to_add)
279 1 5 unless ($is_allowed)
285 0 1 if $ENV{'TRACE'}
287 0 1 $in_prod ? :
291 0 1 if $ENV{'TRACE'}
293 0 1 $in_prod ? :
297 0 3 if $ENV{'TRACE'}
299 0 3 $in_prod ? :
306 0 5 unless open my $fh, '<', $caller
314 5 132 if (/^#(.*)/)
318 93 39 unless $code_found
319 5 34 if m[^#(.*)]
326 5 0 if ($copy)
327 0 5 unless copy($file, $copy)
333 4 1 if ($code[0] =~ /sub\s+(\w+)/) { }
344 1 3 if (grep {$sub_name eq $_;} @$existing_subs)
377 2 1 if $ENV{'TRACE'}
386 16 4 unless $_ =~ /^_/
392 2 0 if $ENV{'TRACE'}
401 4 1 unless $_ =~ /^_/
407 2 1 if $ENV{'TRACE'}
416 8 6 unless $_ =~ /^_/
422 13 178 if $ENV{'TRACE'}
433 10 176 if ($self->{'params'}{'directory'}) { }
438 19 124 if $self->{'write_file_contents'}
447 2 1 if $ENV{'TRACE'}
459 2 28 if $ENV{'TRACE'}
465 1 28 if ($self->{'params'}{'cache_dump'})
469 1 0 if ($self->{'params'}{'cache_dump'} > 1)
474 25 3 if (not $struct and $file)
477 2 1 if ($file and $struct)
483 22 790 if $ENV{'TRACE'}
490 4 367 if $ENV{'TRACE'}
495 57 313 if defined $value
501 18 329 if $ENV{'TRACE'}
509 291 2214 unless $self->_run_end
513 648 1566 if $config_vars->{$var} == 1
521 5 465 unless (exists $config_vars->{$param})
529 5 151 if $ENV{'TRACE'}
550 17 329 if $ENV{'TRACE'}
622 153 311 if ($param eq 'file')
632 16 325 if ($self->_cache_enabled)
645 10 47 unless $self->_cache_safe
649 1 340 if ($self->{'params'}{'config_dump'})
655 2 154 if $ENV{'TRACE'}
660 154 1 defined $p->{'file'} ? :
664 3 152 if ($self->{'params'}{'file'} =~ /::/)
672 2 1 if (not $INC{$file}) { }
676 1 1 if ($@)
691 1 1 unless ($module_is_loaded)
699 11 143 if (-d $self->{'params'}{'file'}) { }
702 3 8 defined $p->{'extensions'} ? :
705 4 139 unless ($self->{'params'}{'file'} and -f $self->{'params'}{'file'})
714 16 282 if $ENV{'TRACE'}
725 15 282 if $ENV{'TRACE'}
732 33 263 unless $file
734 3 260 if ($self->{'params'}{'backup'})
738 1 2 unless copy($file, $bak)
742 1 261 unless -f $file
748 12 249 if ($self->{'rw'}->recsep($file, 'hex') ne $self->{'rw'}->platform_recsep('hex')) { }
772 2 259 if (not $p->{'file_contents'}[0]) { }
782 2 10 if $ENV{'TRACE'}
805 8 104 if $self->{'write_file_contents'}
807 84 28 if (ref $data eq 'HASH' or ref $data eq 'ARRAY')
816 153 2696 if $ENV{'TRACE'}
821 341 2507 if defined $value
825 154 2694 if $value
831 2 28 if $ENV{'TRACE'}
840 1 28 unless $file
842 2 7 if ($self->{'params'}{'directory'} and $copy and not -d $copy)
846 0 2 unless mkdir $copy
848 8 20 if ($copy and -d $copy) { }
17 3 elsif ($copy) { }
863 1 27 if ($@ or not $write_response)
877 14 276 if $ENV{'TRACE'}
892 46 243 if ($self->{'params'}{'pre_proc'})
897 1 28 if ($self->{'params'}{'pre_proc_dump'})
902 16 12 if ($p->{'write_file_contents'})
909 26 2 if ($self->{'params'}{'pre_proc_return'})
923 6 239 if ($cache_enabled and $cache_safe and $self->_cache($p->{'file'})) { }
930 21 224 unless $subs
934 2 221 if ($self->_cache_enabled and not $self->_cache($p->{'file'}))
940 105 118 if ($self->{'params'}{'post_proc'})
947 5 212 if ($self->{'params'}{'post_proc_return'})
955 197 12 if ($self->{'params'}{'engine'})
962 1 203 if ($self->{'params'}{'core_dump'})
978 13 37 if $ENV{'TRACE'}
986 1 48 if (not $pre_proc or $pre_proc eq '')
993 11 37 if ($pre_proc eq 'module')
999 47 1 unless (ref $pre_proc eq 'CODE')
1003 1 46 unless ($compiler->exists($pre_proc))
1012 4 42 if ($@)
1022 1 42 if (ref $pre_proc eq 'CODE')
1040 4 237 if $ENV{'TRACE'}
1047 11 229 unless $file
1052 21 208 unless $PPI_subs
1061 139 1529 defined $self->{'params'}{'include'} ? :
1063 55 1613 defined $self->{'params'}{'exclude'} ? :
1065 44 1624 if $exclude->[0]
1073 8 1660 if grep {$name eq $_;} @$exclude
1075 127 1533 if ($include->[0])
1076 32 271 if $name eq $_
95 32 unless grep {$_ if $name eq $_;} @$include
1105 3 104 if $ENV{'TRACE'}
1117 105 1 if ($post_proc) { }
1121 80 25 if (ref $post_proc ne 'ARRAY') { }
1132 140 5 if (ref $pf ne 'CODE')
1139 3 137 unless ($compiler->exists($pf))
1149 1 136 if ($@)
1158 5 136 if (ref $pf eq 'CODE')
1162 1 140 if ($post_proc_dump and $post_proc_dump > 1)
1167 2 139 if ($post_proc_dump and $post_proc_dump == 1)
1182 4 213 if $ENV{'TRACE'}
1189 201 15 defined $p->{'engine'} ? :
1191 13 203 if (not $engine or $engine eq '')
1197 202 1 unless (ref $engine eq 'CODE')
1206 1 201 unless ($compiler->exists($engine))
1216 1 200 if ($@)
1225 1 200 if (ref $engine eq 'CODE')
1229 1 200 if ($self->{'params'}{'engine_dump'})