Branch Coverage

blib/lib/Test/Stream/Mock.pm
Criterion Covered Total %
branch 85 92 92.3


line true false branch
20 1 90 if &blessed($class)
29 91 122 if ($class->can(uc $arg))
38 1 89 unless $self->{'class'}
44 1 121 unless $self->can($meth)
47 78 43 if (not $type) { }
7 36 elsif ($type eq 'HASH') { }
35 1 elsif ($type eq 'ARRAY') { }
65 425 1 unless $_[0]{'child'}
71 29 3 if @_
96 1 28 if $INC{$file}
159 2 29 if $stash->{'AUTOLOAD'} and *{$stash->{'AUTOLOAD'};}{'CODE'}
204 1 2 if ($want) { }
1 1 elsif (defined $want) { }
216 1 2 if $want
217 1 1 if defined $want
250 44 169 unless $stash->{$name}
260 13 4 unless $sym =~ /^[&\$\%\@]/
262 2 15 unless my $syms = $self->{'_symbols'}
267 2 13 unless $ref and @$ref
279 15 163 if ($param =~ /^-(.*)$/)
286 151 12 if ref $arg and &reftype($arg) eq 'CODE'
291 6 6 if (not ref $arg) { }
6 0 elsif (&reftype($arg) eq 'HASH') { }
292 6 0 if $arg =~ /^(rw|ro|wo)$/
301 0 6 if $val and $is
303 4 0 $val ? :
305 0 6 if keys %$arg
309 0 12 unless $is
313 4 8 if ($is eq 'rw') { }
2 6 elsif ($is eq 'ro') { }
2 4 elsif ($is eq 'wo') { }
343 2 176 unless $orig or $add
347 2 2 if $add and $orig and &reftype($orig) ne 'SCALAR' || defined $$orig
369 45 96 if (defined $set)
381 96 288 if $slot eq $type
384 100 188 if defined *__ORIG__{$slot}
395 5 0 unless $sym =~ /^[&\$\%\@]/
397 1 4 unless my $syms = $self->{'_symbols'}
402 1 3 unless $ref and @$ref
406 1 2 unless @$ref
416 4 136 unless $sym =~ /^[&\$\%\@]/
418 1 139 unless my $syms = $self->{'_symbols'}
423 1 138 unless $ref and @$ref
451 55 27 if $self->{'_symbols'}
453 21 61 if $self->{'_blocked_load'}
455 20 62 if $self->{'_purge_on_destroy'}