Branch Coverage

blib/lib/Cache/Moustache.pm
Criterion Covered Total %
branch 18 32 56.2


line true false branch
25 2 0 if {'Cache', 1, 'Cache::Cache', 1, 'Cache::FastMmap', 1, 'Cache::Moustache', 1, 'Cache::Ref', 1, 'CHI', 1, 'Mojo::Cache', 1}->{$what}
32 2 1 if ref $class and $class->isa('Cache::Moustache')
74 0 18 if $key =~ /^~~~~/
76 3 0 if ref $data and $cache->{'~~~~clone_references'}
78 14 4 unless defined $expires_in
80 0 18 if ($expires_in =~ /^(\d*)\s*([A-Za-z]+)$/)
83 0 0 unless defined $expires_in and length $expires_in
87 0 18 $expires_in < 0 ? :
94 0 14 if $key =~ /^~~~~/
95 3 11 unless exists $cache->{$key}
98 2 9 if ($expires_at >= 0 and $expires_at < time)
111 0 4 if (ref $key eq 'Regexp')
112 0 0 if $_ =~ /$key/
117 0 4 if $key =~ /^~~~~/
118 4 0 delete $cache->{$key} ? :
134 1 0 if $e >= 0