Branch Coverage

blib/lib/Memoize/Expire/ByInstance.pm
Criterion Covered Total %
branch 40 46 86.9


line true false branch
27 9 27 exists $opts{'HASH'} && ref $opts{'HASH'} eq 'HASH' ? :
32 36 0 if $opts{'AUTO_DESTROY'}
45 0 18 unless $key
61 0 53 unless $key
76 0 71 unless $key
78 4 67 if $self->_key_has_expired($instance_id, $key)
89 0 1 unless $key
91 1 0 if exists $$self{'_meta'}{'_hash_data'}{$key}
145 5 11 defined $opts{'lifetime'} ? :
146 6 10 defined $opts{'num_uses'} ? :
152 5 11 if $lifetime != $$self{'_meta'}{'_expire'}{'_default'}{'lifetime'}
154 6 10 if $num_uses != $$self{'_meta'}{'_expire'}{'_default'}{'num_uses'}
170 10 18 if (exists $$self{'_meta'}{'_expire'}{$instance_id})
187 56 15 if (exists $$self{'_meta'}{'_hash_data'}{$key})
194 30 26 if (exists $$self{'_meta'}{'_expire'}{$instance_id})
195 26 4 if exists $$self{'_meta'}{'_expire'}{$instance_id}{'lifetime'}
196 24 6 if exists $$self{'_meta'}{'_expire'}{$instance_id}{'num_uses'}
202 2 54 if $max_lifetime > 0 and time >= $last_set_time + $max_lifetime
203 2 52 if $max_num_uses > 0 and $num_uses >= $max_num_uses
215 142 1 if $key
225 36 143 if defined $value
241 35 1 if defined *{'::' . $class . '::DESTROY';}{'CODE'}
248 28 106 if defined $weakself