Branch Coverage

lib/CSS/Inliner/Parser.pm
Criterion Covered Total %
branch 32 46 69.5


line true false branch
60 34 276 if defined $value
97 1 34 defined $params->{'warns_as_errors'} && $params->{'warns_as_errors'} ? :
129 0 0 unless ($params and $params->{'filename'})
133 0 0 unless open FILE, '<', $params->{'filename'}
165 0 34 unless (exists $params->{'css'})
169 33 1 if ($params and $params->{'css'}) { }
178 6 193 if ($token =~ /^\s*\@[\w-]+\s+(?:url\()?"/) { }
2 191 elsif ($token =~ /^\s*(\@[\w-]+)\s+{\s*([^{]*)}$/) { }
11 180 elsif ($token =~ /^\s*\@/) { }
180 0 elsif ($token =~ /^\s*([^{]+?)\s*{\s*(.*)}\s*$/) { }
202 17 11 if (not $attoken =~ /^\s*\}\s*$/) { }
226 4 296 if (/^\s*[\*\-\_]/ or /\\/)
231 3 293 unless (/^\s*([\w._-]+)\s*:\s*(.*?)\s*$/)
279 0 0 unless (exists $params->{'filename'})
284 0 0 unless open CSS, '>' . $params->{'filename'}
310 12 8 if ($rule->{'selector'} and $rule->{'declarations'}) { }
4 4 elsif ($rule->{'type'} and $rule->{'prelude'} and $rule->{'block'}) { }
3 1 elsif ($rule->{'type'} and $rule->{'prelude'}) { }
1 0 elsif ($rule->{'type'} and $rule->{'block'}) { }
421 193 0 if (exists $params->{'selector'} and exists $params->{'declarations'}) { }
454 19 0 if (exists $params->{'type'} and exists $params->{'prelude'} and exists $params->{'block'}) { }
476 0 621 unless ($self and ref $self)
488 1 3 if ($self->{'warns_as_errors'}) { }