Branch Coverage

blib/lib/Mojo/UserAgent/CookieJar.pm
Criterion Covered Total %
branch 38 38 100.0


line true false branch
19 2 1 $age <= 0 ? :
3 136 if &looks_like_number($age)
22 1 138 if length($cookie->value // "") > $size
25 1 137 unless my $domain = lc($cookie->domain // "")
26 2 135 unless my $path = $cookie->path
27 1 134 unless length(my $name = $cookie->name // "")
48 121 17 unless $cookie->domain
50 9 41 if &$cb($cookie)
50 88 if (my $cb = $self->ignore)
51 7 3 if $host ne $domain and !($host =~ /\Q.$domain\E$/u) || $host =~ /\.\d+$/u
56 3 119 unless _path($path, $url->path->to_abs_string)
70 677 249 unless my $old = $self->{'jar'}{$domain}
75 1 549 if $cookie->host_only and $host ne $cookie->domain
78 4 319 if time > $expires
323 226 if (defined(my $expires = $cookie->expires))
82 1 544 if $cookie->secure and $url->protocol ne "https"
83 134 410 unless _path($cookie->path, $path)
98 746 225 unless keys %{$$self{"jar"};}
108 167 499 unless $_[0] eq "/" or $_[0] eq $_[1]