Branch Coverage

lib/Class/Simple/Readonly/Cached.pm
Criterion Covered Total %
branch 47 64 73.4


line true false branch
85 0 13 unless (defined $class)
91 3 10 if (ref $_[0] eq 'HASH') { }
0 10 elsif (ref $_[0]) { }
10 0 elsif (@_ % 2 == 0) { }
100 3 10 unless ($args{'cache'})
105 8 2 if (defined $args{'object'}) { }
106 7 1 if (ref $args{'object'}) { }
107 1 6 if (ref $args{'object'} eq "Class::Simple::Readonly::Cached")
124 2 6 if ($rc = $cached{$args{'object'}}) { }
125 1 1 unless ($args{'quiet'})
157 0 0 if (ref $self->{'object'} eq "Class::Simple")
186 0 38 if ($param eq "DESTROY")
187 0 0 if ($cache)
188 0 0 if (ref $cache eq "HASH")
194 0 0 if (defined $^V and $^V ge "v5.14.0")
195 0 0 if ${^GLOBAL_PHASE} eq "DESTRUCT"
213 21 17 if (ref $cache eq 'HASH') { }
218 18 20 if (defined $rc)
220 0 18 if $rc eq "never"
221 6 12 if (ref $rc eq "ARRAY")
224 5 1 if (wantarray)
225 4 1 if (defined $foo[0])
226 0 4 if $foo[0] eq "Class::Simple::Readonly::Cached>UNDEF<"
227 0 4 if $foo[0] eq "never"
233 2 10 if ($rc eq "Class::Simple::Readonly::Cached>UNDEF<")
237 9 1 unless (wantarray)
245 8 13 if (wantarray)
247 2 6 if (scalar @rc == 0)
250 3 3 if (ref $cache eq 'HASH') { }
258 2 11 unless (defined $rc)
259 1 1 if (ref $cache eq 'HASH') { }
270 7 4 if (ref $cache eq "HASH")