Condition Coverage

blib/lib/Cookie.pm
Criterion Covered Total %
condition 42 165 25.4


and 2 conditions

line l !l condition
623 709 45 not length $self->{'_reset'} and scalar @_

and 3 conditions

line !l l&&!r l&&r condition
98 0 0 0 defined $algo and length $algo
142 585 3 12 $_ eq "version" and not length $hash->{$_}
182 38 0 0 $self->{'_cache_value'} and not length $self->{'_reset'}
38 0 0 $self->{'_cache_value'} and not length $self->{'_reset'} and not $opts->{'is_request'}
184 0 0 38 defined $name and length $name
249 12 2 14 my $t = $self->expires and not $self->max_age->length
258 24 1 3 $self->same_site->defined and $self->same_site =~ /^(?:lax|strict|none)/i
291 0 0 0 defined $key and length "$key"
292 0 0 0 defined $algo and length "$algo"
351 15 2 0 $self->_is_object($exp) and $exp->isa('DateTime') || $exp->isa('Module::Generic::Datetime')
0 0 5 defined $exp and length $exp
443 0 0 0 defined $exp and not $self->_is_a($exp, "Module::Generic::DateTime")
0 0 0 defined $exp and not $self->_is_a($exp, "Module::Generic::DateTime") and not $self->_is_a($exp, "DateTime")
0 0 0 defined $max_age and not $max_age =~ /\-?\d+$/
449 0 0 0 defined $max_age and $max_age <= 0
0 0 0 defined $exp and $exp < $now
476 0 0 0 exists $opts->{'key'} and not length $opts->{'key'}
598 44 0 0 $name =~ m#[\(\)\<\>\@\,\;\:\\\"/\[\]\?\=\{\}]# and $self->strict
631 0 0 3 $this and $self->_is_object($this)
639 24 21 0 not defined $v and defined $v2
21 24 0 defined $v and not defined $v2
21 24 0 defined $v and length "$v" != length "$v2"
21 0 24 defined $v and defined $v2
21 24 0 defined $v and defined $v2 and "$v" ne "$v2"
692 0 0 0 defined $key and length "$key"
693 0 0 0 defined $algo and length "$algo"
714 0 0 0 defined $iv and length "$iv"

or 2 conditions

line l !l condition
107 0 0 'Crypt::Mode::CBC'->new($algo) || die(qq[Unsupported algorithm "$algo"\n])
181 10 28 $opts->{'is_request'} //= 0
193 0 0 $self->key || (return $self->error('Signature or encryption has been enabled, but no key was provided.'))
214 0 0 $self->_encrypt_objects($key, $algo) || (return $self->pass_error)
286 0 0 $opts->{'key'} //= ""
287 0 0 $opts->{'algo'} //= ""
288 0 0 $opts->{'iv'} //= ""
295 0 0 $self->_encrypt_objects($key, $algo, $opts->{'iv'}) || (return $self->pass_error)
394 9 0 $interval->{$unit} || 1
406 1 0 $exp // "undef"
474 0 0 $self->key || ''
515 0 0 shift @_ || (return 0)
666 0 0 $self->_set_get_uri('uri', @_) || (return)
694 0 0 $iv //= ""

or 3 conditions

line l !l&&r !l&&!r condition
130 1 0 14 not defined $Cookie::SUBS or ref $Cookie::SUBS ne "ARRAY"
1 0 14 not defined $Cookie::SUBS or ref $Cookie::SUBS ne "ARRAY" or not scalar @$Cookie::SUBS
191 0 0 38 $self->sign or $self->encrypt
289 0 0 0 $opts->{'key'} || $self->key
290 0 0 0 $opts->{'algo'} || $self->algo
351 2 0 0 $exp->isa('DateTime') || $exp->isa('Module::Generic::Datetime')
442 0 0 0 defined $exp or defined $max_age
443 0 0 0 defined $exp and not $self->_is_a($exp, "Module::Generic::DateTime") and not $self->_is_a($exp, "DateTime") or defined $max_age and not $max_age =~ /\-?\d+$/
449 0 0 0 defined $max_age and $max_age <= 0 or defined $exp and $exp < $now
465 0 0 0 defined $self->expires || defined $self->max_age
474 0 0 0 $opts->{'key'} ||= $self->key || ''
475 0 0 0 $self->sign or length $opts->{'key'}
476 0 0 0 $self->key->length || exists $opts->{'key'}
0 0 0 not $self->key->length || exists $opts->{'key'} or exists $opts->{'key'} and not length $opts->{'key'}
639 0 0 45 not defined $v and defined $v2 or defined $v and not defined $v2
0 0 45 not defined $v and defined $v2 or defined $v and not defined $v2 or defined $v and length "$v" != length "$v2"
0 0 45 not defined $v and defined $v2 or defined $v and not defined $v2 or defined $v and length "$v" != length "$v2" or defined $v and defined $v2 and "$v" ne "$v2"
713 0 0 0 $iv ||= $self->initialisation_vector