Branch Coverage

blib/lib/XML/Loy/Atom.pm
Criterion Covered Total %
branch 84 104 80.7


line true false branch
40 0 47 unless $_[0]
45 5 42 unless (defined $_[1])
56 21 21 if (not defined $_[2] and $_[0] =~ /(?:text|x?html)/) { }
21 0 elsif (@_ % 2 == 0) { }
67 0 21 if (exists $hash{'src'})
73 1 20 unless $content = delete $hash{'content'}
80 11 30 if ($type eq 'xhtml') { }
25 5 elsif ($type eq 'html' or $type =~ /^text/i) { }
0 5 elsif ($type =~ m[[/\+]xml(;.+)?$]i) { }
140 14 11 if $_[0]
152 2 3 if ($_[0])
153 1 1 unless (defined $_[1])
161 0 3 unless my $coll = $self->_get_information_array("category")
164 3 0 if ($coll->[0])
177 3 3 if $_[0]
189 15 3 if $_[0]
201 0 15 if (ref $_[0]) { }
5 11 elsif ($_[0] and not $_[1]) { }
212 3 2 if $entry
217 0 2 unless $idc and $idc->[0]
226 8 2 if (exists $hash{'id'}) { }
263 2 3 unless ($_[0])
265 2 0 if $id_obj
271 0 3 unless $element
283 11 8 if ($_[1])
286 5 6 if (@_ == 2)
307 3 5 if ($self->parent) { }
337 2 1 if $_[0]
349 0 3 if not $self->tag or $self->tag ne "entry"
352 1 2 if $_[0]
364 1 9 if $self->tag and $self->tag eq "entry"
367 6 3 if $_[0]
379 1 11 if not $self->tag or $self->tag ne "entry"
382 6 5 if $_[0]
394 9 6 if $_[0]
413 3 14 if (ref $_[0]) { }
425 15 0 if $data{$_}
438 9 12 if ($_[0])
441 9 0 unless (ref $date)
452 12 0 if $date
464 0 73 unless ($action eq "add" or $action eq "set")
465 0 0 if warn "Action has to be set or add"
471 37 36 if (ref $_[0])
483 16 21 if ($c_type eq "text")
492 9 28 if $c_type eq "xhtml"
500 24 12 if (defined $_[1]) { }
513 35 1 if ref $text
527 17 0 if $children->[0]
543 34 0 if $children->[0]
557 3 7 unless $feed
560 6 1 if ($_[0])
566 1 0 if $gen