Branch Coverage

lib/Subclass/Of.pm
Criterion Covered Total %
branch 75 120 62.5


line true false branch
30 17 3 if @_
43 0 17 unless my $base = shift()
47 3 14 $opts{'-as'} ? :
51 5 12 if ($opts{'-lazy'}) { }
71 5 12 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 20 if (@_ == 1 and ref $_[0] eq 'HASH')
119 38 33 if (defined $_ and not ref $_ and /^-/)
125 13 20 ref $_ eq 'ARRAY' ? :
137 6 13 if exists $_detect_oo{$pkg}
141 10 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 14 $oo ? :
169 2 14 $oo ? :
237 0 0 unless $opts->{'-has'}
252 1 1 unless $opts->{'-has'}
276 1 7 unless $key =~ /^(is|isa|default|lazy|fieldhash)$/
279 0 5 if (exists $opts->{'lazy'} and not $opts->{'lazy'})
283 0 5 if (exists $opts->{'is'} and not $opts->{'is'} =~ /^(ro|rw|lazy)$/)
287 1 4 if (exists $opts->{'isa'})
290 1 0 unless &blessed($opts->{'isa'}) and $opts->{'isa'}->can('assert_valid')
294 1 3 if (exists $opts->{'fieldhash'} and $opts->{'fieldhash'}) { }
308 1 1 if (@_)
310 0 1 unless $opts->{'is'} eq 'rw'
311 0 1 if $opts->{'isa'}
314 0 2 if (exists $opts->{'default'} and not exists $self->{$name})
318 0 0 ref $opts->{'default'} eq 'CODE' ? :
319 0 0 if $opts->{'isa'}
330 0 3 if (@_)
332 0 0 unless $opts->{'is'} eq 'rw'
333 0 0 if $opts->{'isa'}
336 1 2 if (exists $opts->{'default'} and not exists $self->{$name})
340 1 0 ref $opts->{'default'} eq 'CODE' ? :
341 0 1 if $opts->{'isa'}
359 10 5 unless $opts->{'-has'}
363 0 9 unless $name =~ /^\w+/
366 2 2 ref $attrs[0] eq 'CODE' ? :
0 4 ref $attrs[0] eq 'HASH' ? :
5 4 ref $attrs[0] eq 'ARRAY' ? :
391 12 2 unless $opts->{'-with'}
393 12 2 unless @roles
398 1 1 if (&all(sub { _detect_oo($_) eq ''; } , @roles))
409 1 0 if ($oo eq 'Moo')
414 0 0 if ($oo eq 'Moose')
419 0 0 if ($oo eq 'Mouse')
437 8 6 unless $_[1]{'-methods'}
443 0 10 unless $name =~ /^\w+/
444 0 10 unless ref $code eq 'CODE'
459 0 2 unless (eval { do { require mro } })
467 0 2 unless $super
470 2 0 unless @_