Branch Coverage

blib/lib/Net/DRI/Cache.pm
Criterion Covered Total %
branch 21 34 61.7


line true false branch
83 0 25 unless Net::DRI::Util::all_valid($regname, $type, $key)
86 24 1 unless defined $ttl
87 0 25 $ttl == 0 ? :
93 25 0 if ($data and ref $data eq 'HASH')
101 4 21 if ($self->{'ttl'} >= 0)
103 2 2 unless exists $self->{'data'}{$type}
114 0 0 unless Net::DRI::Util::all_valid($type, $key)
115 0 0 unless exists $self->{'data'}{$type}
124 5 5 if $self->{'ttl'} < 0
125 0 5 unless Net::DRI::Util::all_valid($type, $key)
127 0 5 unless exists $self->{'data'}{$type}
128 0 5 unless exists $self->{'data'}{$type}{$key}
132 1 4 if ($c->{'_until'} > 0 and Net::DRI::Util::microtime() > $c->{'_until'})
138 1 3 if defined $from and $c->{'_from'} ne $from
140 3 0 if (defined $data) { }
142 3 0 if exists $c->{$data}
160 1 0 if $c2->{'_until'} > 0 and $now > $c2->{'_until'}