Branch Coverage

blib/lib/CSS/Object.pm
Criterion Covered Total %
branch 30 78 38.4


line true false branch
40 0 6 unless $self->SUPER::init(@_)
42 3 3 unless ($self->_is_a($self->{'format'}, "CSS::Object::Format"))
58 0 1 unless $self->_is_a($elem, "CSS::Object::Element")
72 0 9 unless defined $rule
73 0 9 unless $self->_is_a($rule, "CSS::Object::Rule")
84 0 2 if (@_)
87 0 0 unless $format =~ /^CSS\::Object\::Format/ or $self->_is_a($format, "CSS::Object::Format")
107 0 1 if $self->_is_object($self->{'_builder'})
123 6 126 if (@_)
127 3 3 if (ref $val) { }
3 0 elsif (not ref $val and index($val, '::') != -1) { }
134 0 3 unless $self->_load_class($val)
145 0 0 unless $self->_is_object($_[0])
146 0 0 unless (shift())->format($format)
156 0 1 unless $name
161 0 3 unless $rule->isa("CSS::Object::Rule")
166 1 4 if ($sel->name eq $name)
174 0 1 if (Want::want('OBJECT')) { }
0 1 elsif (Want::want('LIST')) { }
176 0 0 $found->length > 0 ? :
192 0 5 unless $self->_load_class("$parser_class")
207 0 0 unless defined $o
219 0 1 unless defined $o
227 0 5 unless defined $o
235 0 15 unless defined $o
244 0 26 unless defined $o
253 0 47 unless defined $o
261 0 0 unless defined $o
293 0 5 if (ref $path) { }
5 0 elsif ($path) { }
295 0 0 if (ref $path eq "ARRAY")
309 5 0 if ($source)
326 0 0 if (ref $data) { }
0 0 elsif (length $data) { }
328 0 0 if (ref $data eq "ARRAY")
332 0 0 unless $self->read_string($_)
351 0 0 unless defined $rule
352 0 0 unless $self->_is_a($rule, "CSS::Object::Rule")
358 27 0 $_[0]->_is_a($_, 'CSS::Object::Rule') ? :