Branch Coverage

blib/lib/ensure.pm
Criterion Covered Total %
branch 31 78 39.7


line true false branch
103 1 0 if ($ep eq 'ensure')
108 0 1 exists $exporters{$ep} ? :
112 0 1 if (scalar @_ > 1)
114 0 0 if ($_[1] eq ':ALL') { }
0 0 elsif ($_[1] eq ':NONE' or not $implicit and $_[1] eq ':IMPLICIT') { }
0 0 elsif ($implicit and $_[1] ne ':IMPLICIT' and not $_[1] =~ /^!/) { }
119 0 0 unless stash_value($st, '@EXPORT')
0 0 unless stash_value($st, '@EXPORT_OK')
133 0 0 if (scalar @_ == 1)
147 1 0 if ($ip eq 'main' and scalar @_ == 1)
181 0 1 unless my $st = $packages{$ep}
218 2 0 if ($def)
219 2 0 if (not ref $rv) { }
220 0 2 if ($t eq 'SCALAR') { }
2 0 elsif ($t ne 'GLOB') { }
228 0 2 if (exists $undefined{$name} or $t eq 'CODE' and exists $undefined{$id} or $t eq '' and exists $undefined{'&' . $id}) { }
230 0 0 if ($def) { }
0 0 elsif ($t eq 'SCALAR') { }
234 0 0 unless (defined $rv)
239 0 2 unless ($def)
252 0 1 if (my $etg = stash_value($st, '%EXPORT_TAGS'))
254 0 0 if ($tag ne 'IMPLICIT') { }
256 0 0 unless (exists $all_exports{$name})
266 0 0 unless (exists $default{$name})
277 0 1 if (my $ef = stash_value($st, '@EXPORT_FAIL'))
279 0 0 unless (exists $all_exports{$name})
347 1 1 if ($^D || $^P and $pkg eq 'main')
355 0 1 if (exists $no_ensure{$pkg})
364 2 14 if ($name =~ /^(?:__|_?\W|_?\d)/ or $except{$name} or $undefined{$name})
371 0 14 unless defined $rv
376 11 3 if (ref $rv or defined *$rv{'CODE'})
382 1 2 if (defined $rs and defined $$rs || exists $no_scalar{"$rs"})
387 2 0 if (defined *$rv{$type})
398 0 1 if ($ensure_errors)
414 0 0 unless return *{$pkg . '::';}{'HASH'}
432 2 2 if (defined $rv)
433 2 0 if (not ref $rv) { }
435 0 2 if (defined $rv and $type eq 'SCALAR')
459 4 2 if ($id =~ s/^([\$\@%&*])//)