Branch Coverage

lib/CSS/Simple.pm
Criterion Covered Total %
branch 37 54 68.5


line true false branch
55 10 308 if defined $value
94 1 11 defined $params->{'warns_as_errors'} && $params->{'warns_as_errors'} ? :
1 11 defined $params->{'browser_specific_properties'} && $params->{'browser_specific_properties'} ? :
1 11 defined $params->{'allow_duplicate_properties'} && $params->{'allow_duplicate_properties'} ? :
126 0 0 unless ($params and $params->{'filename'})
130 0 0 unless open FILE, '<', $params->{'filename'}
166 0 10 unless (exists $params->{'css'})
170 10 0 if ($params and $params->{'css'}) { }
178 0 32 unless (/^\s*([^{]+?)\s*\{(.*)\}\s*$/)
194 12 47 if (not $self->_browser_specific_properties and /^\s*[*-_]/ || /\\/)
199 3 52 unless (/^\s*([\w._-]+)\s*:\s*(.*?)\s*$/)
213 3 29 if ($self->check_selector({'selector', $selector})) { }
240 48 4 unless ($self->_allow_duplicate_properties)
246 1 3 if (exists $properties->{$key}) { }
250 0 1 if (XXX) { }
281 0 0 unless (exists $params->{'filename'})
286 0 0 unless open CSS, '>' . $params->{'filename'}
313 25 5 if (keys %{$properties;})
339 0 2 unless XXX
340 0 2 unless $params->{'selector'}
348 2 0 if (keys %{$properties;})
365 2 52 XXX ? :
482 2 0 if ($self->check_selector({'selector', $params->{'selector'}})) { }
522 2 41 if ($self->check_selector({'selector', $params->{'selector'}})) { }
559 1 3 if ($self->check_selector({'selector', $params->{'selector'}})) { }
638 0 521 unless ($self and ref $self)
650 1 2 if ($self->{'warns_as_errors'}) { }