Branch Coverage

blib/lib/CGI/Simple/Util.pm
Criterion Covered Total %
branch 60 96 62.5


line true false branch
16 31 192 unless @params
17 0 192 if (ref $params[0] eq 'HASH') { }
21 23 169 unless $params[0] =~ /^-/
27 266 1116 ref $_ eq 'ARRAY' ? :
34 455 33 if (exists $pos{$key}) { }
41 32 137 if %leftover
48 0 32 unless $attref and ref $attref eq "HASH"
55 33 0 $escape ? :
56 33 0 defined $value ? :
72 11 32 unless $time =~ /^\d+$/
76 7 25 $format eq 'cookie' ? :
107 27 21 if (not $time or lc $time eq 'now') { }
1 20 elsif ($time =~ /^\d+/) { }
9 11 elsif ($time =~ /^([+-]?(?:\d+|\d*\.\d*))([mhdMy]?)/) { }
125 2 49 unless defined $escape
132 0 49 if ($text)
142 13 124 unless defined $unescape
156 0 1 /^#x([0-9a-f]+)$/i && $ebcdic ? :
0 1 /^#x([0-9a-f]+)$/i && $latin ? :
0 1 /^#(\d+)$/ && $ebcdic ? :
8 1 /^#(\d+)$/ && $latin ? :
4 9 /^lt$/i ? :
4 13 /^gt$/i ? :
4 17 /^quot$/i ? :
6 21 if (/^amp$/i) { }
165 0 253 unless defined $toencode
166 0 253 if ($CGI::Simple::Util::UTIL->{'ebcdic'}) { }
179 0 118 unless defined $todecode
181 0 118 if ($CGI::Simple::Util::UTIL->{'ebcdic'}) { }
186 45 0 defined $1 ? :
193 0 0 if ($c < 128) { }
0 0 elsif ($c < 2048) { }
0 0 elsif ($c < 65536) { }
0 0 elsif ($c < 2097152) { }
0 0 elsif ($c < 67108864) { }
0 0 elsif ($c < 2147483648) { }
261 4 66 if $charset
269 0 23 if $OS
271 23 0 unless ($OS)
272 0 23 unless ($OS = $^O)
276 0 23 if ($OS =~ /Win/i) { }
0 23 elsif ($OS =~ /vms/i) { }
0 23 elsif ($OS =~ /bsdos/i) { }
0 23 elsif ($OS =~ /dos/i) { }
0 23 elsif ($OS =~ /^MacOS$/i) { }
0 23 elsif ($OS =~ /os2/i) { }
303 0 23 if exists $self->{'ebcdic'}
305 0 23 if ($self->{'ebcdic'})