Branch Coverage

blib/lib/Class/More.pm
Criterion Covered Total %
branch 47 62 75.8


line true false branch
20 7 83 if @_ > 1
45 59 0 unless ($@)
50 0 59 if (@args and $args[0] eq "extends")
69 3 55 unless (%$class_attrs)
71 2 1 unless (@$build_methods)
86 3 0 unless exists $self->{$key}
91 3 44 if (@$build_methods)
108 35 98 if (exists $args->{$attr_name})
114 12 86 if $spec->{'required'}
119 35 98 if exists $self->{$attr_name}
122 78 20 if (exists $spec->{'default'})
124 19 59 ref $default eq 'CODE' ? :
131 10 46 if (@required_check)
133 9 2 unless (defined $self->{$attr_name})
143 20 40 if exists $ALL_ATTRIBUTES_CACHE{$class}
148 35 5 if (my $current_attrs = $ATTRIBUTES{$class})
156 0 23 if $parent eq "Class::More" or $parent eq "UNIVERSAL"
157 10 13 if (my $parent_attrs = $ATTRIBUTES{$parent})
173 6 59 if (defined &{"${c}::BUILD";})
186 0 65 if $visited->{$class} or not defined $class
195 0 25 if not defined $parent or $parent eq "Class::More" or $parent eq "UNIVERSAL" or $parent eq ""
209 42 38 unless exists $ATTRIBUTES{$current_class}
213 80 0 if (not defined &{"${current_class}::$attr_name";})
226 0 12 if $caller eq $parent_class
229 12 0 unless ($PARENT_LOADED_CACHE{$parent_class})
233 12 0 unless ($INC{$parent_file})
240 12 0 unless (grep {$_ eq $parent_class;} @{"${caller}::ISA";})
250 0 30 if (_inherits_from_fast($cached_class, $class))
260 0 399 if grep {$_ eq $parent;} @isa
262 0 99 if _inherits_from_fast($direct_parent, $parent)
271 0 270 if (_inherits_from_fast($cached_class, $class))