Condition Coverage

blib/lib/Cookie.pm
Criterion Covered Total %
condition 73 533 13.7


and 2 conditions

line l !l condition
111 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
114 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
213 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
216 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
290 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
293 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
328 14 7 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
331 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
351 2 1 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
354 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
477 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
480 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
550 1 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
553 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
599 710 45 not length $self->{'_reset'} and scalar @_
700 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
703 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
99 0 0 0 defined $algo and length $algo
101 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
111 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
114 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
141 585 3 12 $_ eq "version" and not length $hash->{$_}
181 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'}
183 0 0 38 defined $name and length $name
194 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
213 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
216 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
237 12 2 14 my $t = $self->expires and not $self->max_age->length
246 24 1 3 $self->same_site->defined and $self->same_site =~ /^(?:lax|strict|none)/i
279 0 0 0 defined $key and length "$key"
280 0 0 0 defined $algo and length "$algo"
281 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
290 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
293 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
324 21 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
328 21 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
331 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
7 14 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
7 14 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
334 15 2 0 $self->_is_object($exp) and $exp->isa('DateTime') || $exp->isa('Module::Generic::Datetime')
0 0 5 defined $exp and length $exp
340 3 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
351 3 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
354 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
1 2 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
1 2 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
423 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+$/
429 0 0 0 defined $max_age and $max_age <= 0
0 0 0 defined $exp and $exp < $now
456 0 0 0 exists $opts->{'key'} and not length $opts->{'key'}
471 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
477 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
480 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
546 1 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
550 1 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
553 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 1 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 1 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
574 45 0 0 $name =~ m#[\(\)\<\>\@\,\;\:\\\"/\[\]\?\=\{\}]# and $self->strict
607 0 0 3 $this and $self->_is_object($this)
615 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"
668 0 0 0 defined $key and length "$key"
669 0 0 0 defined $algo and length "$algo"
671 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
683 0 0 0 defined $iv and length "$iv"
700 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
703 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')

or 2 conditions

line l !l condition
106 0 0 'Crypt::Mode::CBC'->new($algo) || (return $self->error(qq[Unsupported algorithm "$algo"]))
180 10 28 $opts->{'is_request'} //= 0
192 0 0 $self->key || (return $self->error('Signature or encryption has been enabled, but no key was provided.'))
206 0 0 $self->_encrypt_objects($key, $algo) || (return $self->pass_error)
274 0 0 $opts->{'key'} //= ""
275 0 0 $opts->{'algo'} //= ""
276 0 0 $opts->{'iv'} //= ""
285 0 0 $self->_encrypt_objects($key, $algo, $opts->{'iv'}) || (return $self->pass_error)
375 9 0 $interval->{$unit} || 1
454 0 0 $self->key || ''
493 0 0 shift @_ || (return 0)
642 0 0 $self->_set_get_uri('uri', @_) || (return)
670 0 0 $iv //= ""
675 0 0 'Crypt::Mode::CBC'->new("$algo") || (return $self->error('Unable to create a Crypt::Mode::CBC object.'))

or 3 conditions

line l !l&&r !l&&!r condition
114 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
129 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
190 0 0 38 $self->sign or $self->encrypt
216 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
277 0 0 0 $opts->{'key'} || $self->key
278 0 0 0 $opts->{'algo'} || $self->algo
293 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
331 14 0 7 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 14 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 14 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
334 2 0 0 $exp->isa('DateTime') || $exp->isa('Module::Generic::Datetime')
354 2 0 1 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 2 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 2 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
422 0 0 0 defined $exp or defined $max_age
423 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+$/
429 0 0 0 defined $max_age and $max_age <= 0 or defined $exp and $exp < $now
445 0 0 0 defined $self->expires || defined $self->max_age
454 0 0 0 $opts->{'key'} ||= $self->key || ''
455 0 0 0 $self->sign or length $opts->{'key'}
456 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'}
480 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
553 1 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 1 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 1 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
615 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"
682 0 0 0 $iv ||= $self->initialisation_vector
703 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')