Branch Coverage

blib/lib/CSS/DOM/PropertyParser.pm
Criterion Covered Total %
branch 167 180 92.7


line true false branch
39 2330 2 exists $_[0]{$_[1]} ? :
43 0 1 unless delete $_[0]{$_[1]}
51 0 1414 unless exists $_[0]{$_[1]}
55 135 0 if exists $p->{'properties'} and $p->{'properties'}
78 0 1203 unless exists $self->{$property}
93 6 15 if (exists $spec->{'special_values'} and $types eq 'i' and exists $spec->{'special_values'}{$CSS::DOM::PropertyParser::prepped->[0]})
101 6 1191 if ($types eq 'i' and $CSS::DOM::PropertyParser::prepped->[0] eq 'inherit')
105 0 6 if ($shorthand) { }
125 32 1159 $format =~ // ? :
131 1 669 unless exists $self->{$_}
141 78 1113 unless $types =~ /^$pattern\z/
146 118 995 if ($shorthand) { }
148 65 53 exists $spec->{'properties'} ? :
155 106 515 if (exists $retval->{$_}) { }
160 393 0 if ($subprops and exists $subprops->{$_})
163 273 173 if ($Match[$c] and length $Match[$c][0])
164 157 116 unless $arglistified[$c]++
172 242 273 unless ($set)
178 176 66 length $default ? :
195 90 905 exists $spec->{'list'} && $spec->{'list'} ? :
204 90 1334 if (@_ == 1) { }
206 44 46 @$list <= 1 ? :
228 64 9 if (@valtypes != 1 and $valtypes[0] != 23 || do { BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x55\x55\x55\x55\x54\x55\x51\x54\x40\x55\x55\x55\x55\x05"} my $found; foreach $_ (@valtypes[1 ... $#valtypes - 1]) { ++$found, last if $_ == -1; } ; $found })
271 0 46 $1 eq 'D' ? :
18 46 $1 eq '%' ? :
292 4 5 $types =~ /'/ ? :
4 5 $types =~ /i.*?i/ ? :
10 222 substr($types, 0, 1) eq '#' ? :
7 6 $2 eq 'D' ? :
3 13 $1 eq 'i' ? :
4 0 $type == 24 ? :
5 4 $type == 22 ? :
232 9 $type == 25 ? :
9 241 $type == 23 ? :
40 250 $type == 20 ? :
671 290 $type == 21 ? :
55 961 $type == 19 ? :
254 1016 $type == 1 || $type == 2 || $type == 3 || $type == 4 || $type == 5 || $type == 6 || $type == 7 || $type == 8 || $type == 9 || $type == 10 || $type == 11 || $type == 12 || $type == 13 || $type == 14 || $type == 15 || $type == 16 || $type == 17 ? :
304 0 2465 if ref $tokens ne 'ARRAY'
308 86 491 if ($$tokens[-1 + pos($types)] =~ /^[+-]\z/) { }
323 0 1203 unless defined &CSS::DOM::PropertyParser::unescape
326 915 288 if (@_ > 1) { }
347 1119 724 if ($type =~ /[if#]/) { }
200 524 elsif ($type eq 'D') { }
141 383 elsif ($type eq '1') { }
45 338 elsif ($type eq 'd') { }
349 1061 58 if ($type eq 'i') { }
13 45 elsif ($type eq '#') { }
350 216 845 if ($thing =~ /^$colour_names_re\z/o) { }
31 814 elsif ($thing =~ /^$system_colour_names_re\z/o) { }
354 11 2 if $thing =~ /^#(?:[0-9a-f]{3}){1,2}\z/
361 24 176 if ($thing =~ /^(?:deg|g?rad)\z/) { }
147 29 elsif ($thing =~ /^(?:e[mx]|p[xtc]|in|[cm]m)\z/) { }
370 43 2 if $tokens->[$_] =~ /^[+-]\z/
372 1371 472 unless defined $alt_type[$_]
474 0 116 $no_match_stuff ? :
489 274 1413 if $1
497 32 1381 if ($2) { }
138 1243 elsif ($3) { }
477 766 elsif ($4) { }
18 748 elsif ($5) { }
35 713 elsif ($6) { }
659 54 elsif (do { $7 =~ /^[]|[()]\z/ }) { }
536 13 0 $3 eq 'url' ? :
3 13 $3 eq 'time' ? :
8 16 $3 eq 'str/words' ? :
8 24 $3 eq 'string' ? :
2 32 $3 eq 'shape' ? :
29 34 $3 eq 'percentage' ? :
7 63 $3 eq 'number' ? :
34 70 $3 eq 'length' ? :
5 104 $3 eq 'integer' ? :
3 109 $3 eq 'identifier' ? :
3 112 $3 eq 'frequency' ? :
4 115 $3 eq 'counter' ? :
11 119 $3 =~ /^colou?r\z/ ? :
4 130 $3 eq 'attr' ? :
4 134 $3 eq 'angle' ? :
664 569 90 if (do { $7 =~ /^[])|]\z/ })
666 6 563 if (@$markers)
671 39 51 $7 eq ']' ? :
479 90 $7 eq '|' ? :
696 569 90 if (do { $7 =~ /^[[(|]\z/ })
697 90 479 unless $7 eq '|'
704 51 518 if $7 eq '('
709 7 2 do { $7 =~ /^[;{},:]\z/ } ? :
45 9 do { $7 =~ /^[?*+]\z/ } ? :
716 10 106 if (@{$permut_marker[0];})
722 116 0 unless $no_match_stuff
747 115 45 if (@_ == 2) { }