Branch Coverage

lib/Class/Simple/Readonly/Cached.pm
Criterion Covered Total %
branch 57 74 77.0


line true false branch
91 1 18 unless (defined $class)
95 1 17 if (builtin::blessed($class))
104 1 15 if (builtin::blessed($$params{'cache'})) { }
2 13 elsif (ref $$params{'cache'} ne 'HASH') { }
105 0 1 if (ref $$params{"cache"} ne "HASH" and not $$params{'cache'}->can('get') && $$params{'cache'}->can('set') && $$params{'cache'}->can('purge'))
112 11 5 if (defined $$params{'object'}) { }
113 10 1 if (ref $$params{'object'}) { }
114 1 9 if (ref $$params{"object"} eq __PACKAGE__)
133 3 11 if ($rc = $cached{$$params{"object"}})
134 2 1 unless ($$params{"quiet"})
210 1 2 if ($class eq ref $self or $class eq __PACKAGE__ or $self->SUPER::isa($class))
226 2 46 if ($param eq "DESTROY")
227 2 0 if (defined $^V and $^V ge "v5.14.0")
228 0 2 if ${^GLOBAL_PHASE} eq "DESTRUCT"
230 2 0 if ($cache)
231 2 0 if (ref $cache eq "HASH")
257 28 18 if (ref $cache eq 'HASH') { }
262 24 22 if (defined $rc)
264 0 24 if $rc eq "never"
265 6 18 if (ref $rc eq "ARRAY")
268 5 1 if (wantarray)
269 4 1 if (defined $foo[0])
270 0 4 if $foo[0] eq "Class::Simple::Readonly::Cached>UNDEF<"
271 0 4 if $foo[0] eq "never"
278 4 14 if ($rc eq "Class::Simple::Readonly::Cached>UNDEF<")
282 13 1 unless (wantarray)
290 8 15 if (wantarray)
292 2 6 if (scalar @rc == 0)
293 1 1 if (ref $cache eq 'HASH') { }
302 0 12 if (ref $_)
303 0 0 if (ref $_ eq "GLOB")
307 0 0 if (ref $_ ne "ARRAY" and ref $_ ne "HASH" and ref $_ ne "SCALAR")
313 6 0 if $can_fixate
314 3 3 if (ref $cache eq 'HASH') { }
322 0 15 unless (defined $rc)
323 0 0 if (ref $cache eq 'HASH') { }
335 10 5 if (ref $cache eq "HASH")