Branch Coverage

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


line true false branch
64 1 14 unless (defined $class)
68 1 13 if (builtin::blessed($class))
82 3 8 if (builtin::blessed($params->{'cache'}))
83 0 3 unless ($params->{'cache'}->can("get") and $params->{'cache'}->can("set") and $params->{'cache'}->can("purge"))
88 4 4 if (ref $params->{'cache'} eq "HASH")
118 1 2 if ($class eq ref $self or $class eq __PACKAGE__ or $self->SUPER::isa($class))
139 8 0 if (my $cache = $self->{'cache'})
140 5 3 if (ref $cache eq 'HASH') { }
162 0 36 if ($param eq "DESTROY")
163 0 0 if (ref $cache eq "HASH")
173 0 0 if (defined $^V and $^V ge "v5.14.0")
174 0 0 if ${^GLOBAL_PHASE} eq "DESTRUCT"
193 30 6 if (scalar @_ == 0)
196 14 16 if (ref $cache eq 'HASH') { }
201 17 13 if ($rc)
202 0 17 if $rc eq "never"
203 4 13 if (ref $rc eq "ARRAY")
205 0 4 if $foo[0] eq "Class::Simple::Cached>UNDEF<"
206 0 4 if $foo[0] eq "never"
209 1 12 if ($rc eq "Class::Simple::Cached>UNDEF<")
214 8 5 if (wantarray)
216 3 5 if (scalar @rc == 0)
219 2 3 if (ref $cache eq 'HASH') { }
226 4 1 if (defined(my $rc = $object->$param))
227 2 2 if (ref $cache eq "HASH")
232 0 1 if (ref $cache eq "HASH")
243 2 4 if ($_[1])
246 1 1 if (defined(my $val = $object->$param(\@_)))
247 0 1 if (ref $cache eq 'HASH') { }
254 0 1 if (ref $cache eq "HASH")
261 2 2 if (ref $cache eq "HASH")