Branch Coverage

blib/lib/Class/Simple.pm
Criterion Covered Total %
branch 64 78 82.0


line true false branch
39 11 86 if $attrib =~ /^_/
41 35 62 unless $prefix
43 12 85 if (my $get_attributes = $self->can('ATTRIBUTES'))
48 2 10 unless &first(sub { $_ eq $attrib; } , @attributes)
55 24 71 if ($prefix eq 'set') { }
22 49 elsif ($prefix eq 'get') { }
1 48 elsif ($prefix eq 'clear') { }
1 47 elsif ($prefix eq 'raise') { }
13 34 elsif ($prefix eq 'readonly') { }
11 23 elsif (not $prefix and $attrib =~ /^_/) { }
63 2 51 if $READONLY{$ref}{$store_as}
64 0 51 if (@_ > 1) { }
66 0 0 if (ref $STORAGE{$ref}{$store_as} eq 'ARRAY') { }
0 0 elsif (ref $STORAGE{$ref}{$store_as} eq 'HASH') { }
153 3 8 if (my $method = $pkg->can($attrib))
162 4 14 unless $pkg->isa(_my_caller())
165 6 8 if (scalar @_) { }
168 0 6 if $READONLY{$ref}{$store_as}
185 11 63 scalar @_ ? :
204 22 0 if exists $STORAGE{$ref}
205 21 1 if exists $READONLY{$ref}
222 42 0 unless exists $STORAGE{$ref}{$storage}
226 40 20 if $c eq 'Class::Simple'
227 0 20 if $STORAGE{$ref}{$storage}{$c}++
230 7 13 if (my $in = $c->can($func))
235 11 31 if $self->can($func)
254 1 21 if exists do { $classy }->{'NONEW'}
288 6 1 unless $PRIVATE{$private_class}{$method}
289 1 0 unless $private_class->isa($class)
297 1 7 if $class ne $called_by
317 0 1 unless $class->isa(_my_caller())
327 0 5 unless $class->isa(_my_caller())
331 1 4 if $READONLY{$ref}{$method}
339 3 3 unless $class->isa(_my_caller())
342 2 1 scalar @_ ? :
360 38 54 unless $c eq 'Class::Simple'
380 2 19 if (scalar @_ and scalar(@_) % 2 == 0)
441 0 1 unless eval 'require Storable; 1'
459 0 1 unless eval 'require Storable; 1'