Branch Coverage

blib/lib/Devel/Examine/Subs.pm
Criterion Covered Total %
branch 261 274 95.2


line true false branch
33 57 0 if (not defined &Devel::Examine::Subs::trace)
46 3 136 if ($ENV{'DES_TRACE'})
51 3 136 if $ENV{'TRACE'}
68 2 24 if $ENV{'TRACE'}
79 2 47 if $ENV{'TRACE'}
91 2 6 if $ENV{'TRACE'}
102 2 6 if $ENV{'TRACE'}
109 5 2 if ($self->{'params'}{'search'} or $p->{'search'})
117 2 7 if $ENV{'TRACE'}
125 1 7 if (@_ == 1) { }
146 2 13 if $ENV{'TRACE'}
158 2 6 if $ENV{'TRACE'}
172 2 7 if $ENV{'TRACE'}
184 2 6 if $ENV{'TRACE'}
189 3 1 unless ($p->{'injects'} or $self->{'params'}{'injects'})
201 2 5 if $ENV{'TRACE'}
207 4 1 if ($p->{'inject_use'} or $p->{'inject_after_sub_def'} or defined $p->{'line_num'})
215 2 1 if $ENV{'TRACE'}
226 2 1 if $ENV{'TRACE'}
238 2 5 if $ENV{'TRACE'}
257 5 10 if ($_ eq $to_add)
263 1 5 unless ($is_allowed)
269 0 1 if $ENV{'TRACE'}
271 0 1 $in_prod ? :
275 0 1 if $ENV{'TRACE'}
277 0 1 $in_prod ? :
281 0 3 if $ENV{'TRACE'}
283 0 3 $in_prod ? :
290 0 5 unless open my $fh, '<', $caller
298 5 134 if (/^#(.*)/)
302 95 39 unless $code_found
303 5 34 if m[^#(.*)]
310 5 0 if ($copy)
311 0 5 unless copy($file, $copy)
317 4 1 if ($code[0] =~ /sub\s+(\w+)/) { }
328 1 3 if (grep {$sub_name eq $_;} @$existing_subs)
361 2 1 if $ENV{'TRACE'}
370 16 4 unless $_ =~ /^_/
376 2 0 if $ENV{'TRACE'}
385 4 1 unless $_ =~ /^_/
391 2 1 if $ENV{'TRACE'}
400 8 6 unless $_ =~ /^_/
406 13 173 if $ENV{'TRACE'}
417 9 172 if ($self->{'params'}{'directory'}) { }
422 18 121 if $self->{'write_file_contents'}
431 2 1 if $ENV{'TRACE'}
443 2 28 if $ENV{'TRACE'}
449 1 28 if ($self->{'params'}{'cache_dump'})
453 1 0 if ($self->{'params'}{'cache_dump'} > 1)
458 25 3 if (not $struct and $file)
461 2 1 if ($file and $struct)
467 22 748 if $ENV{'TRACE'}
474 4 352 if $ENV{'TRACE'}
479 57 298 if defined $value
485 18 316 if $ENV{'TRACE'}
493 278 2160 unless $self->_run_end
497 594 1566 if $config_vars->{$var} == 1
505 5 458 unless (exists $config_vars->{$param})
513 5 146 if $ENV{'TRACE'}
534 17 316 if $ENV{'TRACE'}
605 151 306 if ($param eq 'file')
615 16 312 if ($self->_cache_enabled)
628 10 47 unless $self->_cache_safe
632 1 327 if ($self->{'params'}{'config_dump'})
638 2 152 if $ENV{'TRACE'}
643 152 1 defined $p->{'file'} ? :
647 3 150 if ($self->{'params'}{'file'} =~ /::/)
655 2 1 if (not $INC{$file}) { }
659 1 1 if ($@)
674 1 1 unless ($module_is_loaded)
682 10 142 if (-d $self->{'params'}{'file'}) { }
685 3 7 defined $p->{'extensions'} ? :
688 4 138 unless ($self->{'params'}{'file'} and -f $self->{'params'}{'file'})
697 16 269 if $ENV{'TRACE'}
708 15 258 if $ENV{'TRACE'}
715 30 242 unless $file
720 1 241 unless copy($file, $bak)
742 2 239 if (not $p->{'file_contents'}[0]) { }
752 2 9 if $ENV{'TRACE'}
775 8 89 if $self->{'write_file_contents'}
777 70 27 if (ref $data eq 'HASH' or ref $data eq 'ARRAY')
786 150 2622 if $ENV{'TRACE'}
791 331 2440 if defined $value
795 149 2622 if $value
801 2 27 if $ENV{'TRACE'}
810 1 27 unless $file
812 2 7 if ($self->{'params'}{'directory'} and $copy and not -d $copy)
816 0 2 unless mkdir $copy
818 8 19 if ($copy and -d $copy) { }
16 3 elsif ($copy) { }
833 1 26 if ($@ or not $write_response)
847 14 257 if $ENV{'TRACE'}
862 42 228 if ($self->{'params'}{'pre_proc'})
867 1 24 if ($self->{'params'}{'pre_proc_dump'})
872 15 9 if ($p->{'write_file_contents'})
879 22 2 if ($self->{'params'}{'pre_proc_return'})
893 6 224 if ($cache_enabled and $cache_safe and $self->_cache($p->{'file'})) { }
900 20 210 unless $subs
904 2 207 if ($self->_cache_enabled and not $self->_cache($p->{'file'}))
910 101 108 if ($self->{'params'}{'post_proc'})
917 5 198 if ($self->{'params'}{'post_proc_return'})
925 183 12 if ($self->{'params'}{'engine'})
932 1 189 if ($self->{'params'}{'core_dump'})
948 13 33 if $ENV{'TRACE'}
956 1 44 if (not $pre_proc or $pre_proc eq '')
963 8 36 if ($pre_proc eq 'module')
969 43 1 unless (ref $pre_proc eq 'CODE')
973 1 42 unless ($compiler->exists($pre_proc))
982 4 38 if ($@)
992 1 38 if (ref $pre_proc eq 'CODE')
1010 4 222 if $ENV{'TRACE'}
1017 11 214 unless $file
1022 20 194 unless $PPI_subs
1031 139 1413 defined $self->{'params'}{'include'} ? :
1033 55 1497 defined $self->{'params'}{'exclude'} ? :
1035 44 1508 if $exclude->[0]
1043 8 1544 if grep {$name eq $_;} @$exclude
1045 127 1417 if ($include->[0])
1046 32 271 if $name eq $_
95 32 unless grep {$_ if $name eq $_;} @$include
1075 3 100 if $ENV{'TRACE'}
1087 101 1 if ($post_proc) { }
1091 76 25 if (ref $post_proc ne 'ARRAY') { }
1102 136 5 if (ref $pf ne 'CODE')
1109 3 133 unless ($compiler->exists($pf))
1119 1 132 if ($@)
1128 5 132 if (ref $pf eq 'CODE')
1132 1 136 if ($post_proc_dump and $post_proc_dump > 1)
1137 2 135 if ($post_proc_dump and $post_proc_dump == 1)
1152 4 199 if $ENV{'TRACE'}
1159 187 15 defined $p->{'engine'} ? :
1161 13 189 if (not $engine or $engine eq '')
1167 188 1 unless (ref $engine eq 'CODE')
1176 1 187 unless ($compiler->exists($engine))
1186 1 186 if ($@)
1195 1 186 if (ref $engine eq 'CODE')
1199 1 186 if ($self->{'params'}{'engine_dump'})