Branch Coverage

blib/lib/RDF/Simple/Parser/Handler.pm
Criterion Covered Total %
branch 58 82 70.7


line true false branch
56 492 12 if $self->{'_ns'}
82 12 92 if ($sax->{'LocalName'} eq 'RDF')
88 2 36 if ($rh->{'Prefix'} eq 'xml' and $rh->{'LocalName'} eq 'base')
98 92 12 if (scalar @$stack > 0)
139 92 12 if (scalar @$stack > 0) { }
165 0 110 if ($uri =~ /\A:/) { }
11 198 elsif ($uri =~ /\A#/ and defined $sBase) { }
182 0 11 if $self->bnode_absolute_prefix
190 0 0 if ($attrs->{'lang'} and $attrs->{'dtype'})
206 0 12 unless $doc->URI eq $self->ns->uri('rdf') . 'RDF'
207 11 1 if $doc->children
208 1 11 unless (scalar @children > 0)
226 0 34 if $dis
229 3 31 if ($e->attrs->{$rdf . 'ID'}) { }
24 7 elsif ($e->attrs->{$rdf . 'about'}) { }
3 4 elsif ($e->attrs->{$rdf . 'nodeID'}) { }
3 1 elsif (not $e->subject) { }
245 13 21 if ($e->URI ne $rdf . 'Description')
249 0 34 if ($e->attrs->{$rdf . 'type'})
258 0 31 unless ($in)
280 11 46 if ($e->URI eq $rdf . 'li')
287 6 51 if ($e->attrs->{$rdf . 'resource'})
293 3 48 if (scalar @$children == 1 and not $e->attrs->{$rdf . 'parseType'})
302 44 1 if (scalar @$children eq 0 and defined $e->text and $e->text ne '')
308 3 1 if ($ptype)
310 1 2 if ($ptype eq 'Resource')
315 1 1 if ($ptype eq 'Collection')
323 1 0 if (not defined $e->text or $e->text eq '')
341 3 0 if ($e->parent)
345 0 3 if ($e->attrs->{$rdf . 'ID'})
374 0 44 if ($e->attrs->{$rdf . 'ID'})
389 0 1 if ($e->attrs->{$rdf . 'ID'})
435 0 1 if (scalar @s eq 0) { }
466 1 0 unless my $base = $e->base
472 0 1 if ($id) { }
480 0 1 if ($e->attrs->{$rdf . 'resource'}) { }
0 1 elsif ($e->attrs->{$rdf . 'nodeID'}) { }
484 0 0 unless $res =~ m[\://]
499 1 0 if (scalar @a < 1)
507 0 0 if ($a ne $rdf . 'type') { }
520 0 1 if ($e->attrs->{$rdf . 'ID'})