Branch Coverage

blib/lib/Safe.pm
Criterion Covered Total %
branch 56 82 68.2


line true false branch
23 0 42 $_[1] ? :
37 10 0 if (defined &B::sub_generation) { }
152 5 12 if (defined $root) { }
153 0 5 if $root =~ /^main\b/ or not $root =~ /^\w[:\w]*$/
165 0 17 if defined $mask
176 17 0 if $Opcode::VERSION > 1.04
183 12 5 if $$obj{'Erase'}
214 12 3 if ($action and $action eq 'DESTROY') { }
231 0 52 if @_
238 2 1 unless @_
284 0 25 unless ref $vars eq 'ARRAY'
288 0 25 unless keys %{"${pkg}::";}
293 988 41 if ($var = $arg) =~ s/^(\W)//
301 42 0 $type eq '*' ? :
2 42 $type eq '%' ? :
42 44 $type eq '@' ? :
170 86 $type eq '$' ? :
1720 256 $type eq '&' ? :
82 1976 !$type ? :
305 25 0 unless $no_record or not $vars
315 25 0 if @$vars
351 45 401 if \%{$root . $_;} eq \%$root
358 0 42 unless $obj->isa('Safe')
365 1 41 wantarray ? :
368 42 0 if $sg != sub_generation()
370 1 41 wantarray ? :
388 46 4 unless my $reftype = $item && reftype $item
392 0 4 if ++$OID{refaddr $item} > 1
394 2 2 if ($reftype eq 'ARRAY') { }
1 1 elsif ($reftype eq 'HASH') { }
1 0 elsif ($reftype eq 'CODE') { }
410 0 2 unless $obj->isa('Safe')
415 0 2 if reftype $sub ne 'CODE'
427 0 2 wantarray ? :
431 2 0 if $sg != sub_generation()
433 2 0 if ($error)
437 0 0 wantarray ? :
446 0 1 unless $obj->isa('Safe')
453 0 1 wantarray ? :
456 1 0 if $sg != sub_generation()
458 0 1 wantarray ? :