Branch Coverage

lib/Subclass/Of.pm
Criterion Covered Total %
branch 68 106 64.1


line true false branch
30 16 3 if @_
43 0 16 unless my $base = shift()
47 2 14 $opts{-'as'} ? :
51 5 11 if ($opts{-'lazy'}) { }
71 5 11 if (exists &{"${caller}::$a";})
74 2 2 $old eq '(unknown package)' ? :
2 2 $subclass ? :
4 1 $old ? :
88 0 2 unless ref $_[0]
90 0 0 if @r != 1 and defined wantarray and not wantarray
92 0 2 wantarray ? :
98 0 3 unless my $base = shift()
108 0 19 if (@_ == 1 and ref $_[0] eq 'HASH')
119 35 30 if (defined $_ and not ref $_ and /^-/)
125 12 18 ref $_ eq 'ARRAY' ? :
137 6 12 if exists $_detect_oo{$pkg}
141 9 3 unless $pkg->can('meta')
143 3 0 if ref $pkg->meta eq 'Moo::HandleMoose::FakeMetaClass'
145 0 0 if $pkg->meta->isa('Mouse::Meta::Module')
147 0 0 if $pkg->meta->isa('Moose::Meta::Class')
149 0 0 if $pkg->meta->isa('Moose::Meta::Role')
168 2 13 $oo ? :
169 2 13 $oo ? :
237 0 0 unless $$opts{-'has'}
252 1 1 unless $$opts{-'has'}
275 1 5 unless $key =~ /^(is|isa|default|lazy)$/
278 0 4 if (exists $opts->{'lazy'} and not $opts->{'lazy'})
282 0 4 if (exists $opts->{'is'} and not $opts->{'is'} =~ /^(ro|rw|lazy)$/)
286 1 3 if (exists $opts->{'isa'})
289 1 0 unless &blessed($opts->{'isa'}) and $opts->{'isa'}->can('assert_valid')
295 0 3 if (@_)
297 0 0 unless $opts->{'is'} eq 'rw'
298 0 0 if $opts->{'isa'}
301 1 2 if (exists $opts->{'default'} and not exists $self->{$name})
305 1 0 ref $opts->{'default'} eq 'CODE' ? :
306 0 1 if $opts->{'isa'}
321 10 4 unless $$opts{-'has'}
325 0 8 unless $name =~ /^\w+/
328 2 2 ref $attrs[0] eq 'CODE' ? :
0 4 ref $attrs[0] eq 'HASH' ? :
4 4 ref $attrs[0] eq 'ARRAY' ? :
353 11 2 unless $$opts{-'with'}
355 11 2 unless @roles
360 1 1 if (&all(sub { _detect_oo($_) eq ''; } , @roles))
371 1 0 if ($oo eq 'Moo')
376 0 0 if ($oo eq 'Moose')
381 0 0 if ($oo eq 'Mouse')
399 7 6 unless $_[1]{-'methods'}
405 0 10 unless $name =~ /^\w+/
406 0 10 unless ref $code eq 'CODE'
421 0 2 unless (eval { do { require mro } })
429 0 2 unless $super
432 2 0 unless @_