Branch Coverage

blib/lib/AtteanX/Parser/RDFXML.pm
Criterion Covered Total %
branch 80 162 49.3


line true false branch
134 1 4 if (my $map = $self->namespaces)
138 1 4 if ($self->has_base)
144 1 4 if $self->has_base
146 0 5 if (ref $data) { }
149 4 1 if (length $data > 0)
155 1 4 if ($@)
156 0 1 if ($@ =~ /no element found at line 1, column 0, byte/u) { }
163 0 4 if ($nodes and scalar @$nodes)
167 0 4 if ($expect and scalar @$expect > 2)
211 1 4 if (my $ns = $args{'namespaces'})
214 1 4 if (my $base = $args{'base'})
243 8 0 unless $self->expect == 8
244 3 5 if ($self->{'depth'} == 1 and $el->{'NamespaceURI'} eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' and $el->{'LocalName'} eq 'RDF') { }
249 0 5 if $expect == 0
251 3 2 if ($expect == 1 or $expect == 4) { }
0 2 elsif ($self->expect == 22) { }
2 0 elsif ($self->expect == 2) { }
0 0 elsif ($self->expect == 8) { }
256 0 3 if ($self->expect == 4)
257 0 0 if (defined $self->{'characters'} and length(my $string = $self->{'characters'}))
258 0 0 if $string =~ /\S/u
264 0 3 if ($self->peek_expect == 22) { }
0 3 elsif ($self->expect == 4) { }
266 0 0 if (my $last = $self->{'collection_last'}[0])
280 0 3 if ($uri ne "http://www.w3.org/1999/02/22-rdf-syntax-ns#Description")
296 0 2 if ($node->value eq "http://www.w3.org/1999/02/22-rdf-syntax-ns#li")
302 0 2 if (my $data = $el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}datatype'})
306 0 2 if (my $data = $el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}ID'}) { }
313 0 2 if (my $pt = $el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}parseType'}) { }
1 1 elsif (my $data = $el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}resource'}) { }
0 1 elsif (my $ndata = $el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}nodeID'}) { }
0 1 elsif (my $node = $self->parse_literal_property_attributes($el)) { }
314 0 0 if ($pt->{'Value'} eq 'Resource') { }
0 0 elsif ($pt->{'Value'} eq 'Literal') { }
0 0 elsif ($pt->{'Value'} eq 'Collection') { }
361 0 0 if ($el->{'Prefix'}) { }
369 0 0 if (my $ns = $el->{'NamespaceURI'})
371 0 0 unless ($self->{'defined_literal_namespaces'}{$abbr}{$ns})
373 0 0 if (length $abbr)
380 0 0 if (%$attr)
385 0 0 if ($el->{'Prefix'}) { }
407 3 5 if ($expect == 1) { }
3 2 elsif ($expect == 2) { }
2 0 elsif ($expect == 4 or $expect == 8 and $self->{'literal_depth'} == $self->{'depth'}) { }
0 0 elsif ($expect == 22) { }
0 0 elsif ($expect == 8) { }
414 0 3 if ($self->expect == 2) { }
423 1 1 if (exists $self->{'rdf:resource'})
430 1 1 if (defined $self->{'characters'})
440 0 2 if ($self->expect == 22)
451 0 0 if (my $last = $self->{'collection_last'}[0])
469 0 0 if ($el->{'Prefix'}) { }
480 8 0 if ($cleanup)
492 1 0 if ($expect == 8 or $expect == 4 and $self->{'chars_ok'})
512 0 1 unless ($ns)
514 0 0 unless length $ns
517 0 1 if $ns eq "http://www.w3.org/XML/1998/namespace"
518 0 1 if $ns eq "http://www.w3.org/2000/xmlns/"
523 0 1 $uri eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' ? :
528 1 4 $asserted ? :
535 3 0 if ($self->{'sthandler'})
537 0 3 if (defined(my $id = $self->{'reify_id'}[0]))
556 0 3 if ($el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}about'}) { }
2 1 elsif ($el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}ID'}) { }
0 1 elsif ($el->{'Attributes'}{'{http://www.w3.org/1999/02/22-rdf-syntax-ns#}nodeID'}) { }
578 1 7 if (exists $el->{'Attributes'}{'{http://www.w3.org/XML/1998/namespace}base'})
588 0 8 if (exists $el->{'Attributes'}{'{http://www.w3.org/XML/1998/namespace}lang'})
601 2 4 if (&blessed(my $ns = $self->{'namespaces'}))
602 2 0 unless ($ns->namespace_uri($prefix))
608 0 8 if (exists $el->{'Attributes'}{'{}xmlns'})
620 3 7 if ($base)
621 0 3 &blessed($base) && $base->isa('URI') ? :
671 5 7 if (exists $pad->{$prefix})
681 2 0 if (my $prefix = $self->{'prefix'}) { }
693 0 2 if (my $dt = $self->{'datatype'}) { }
0 2 elsif (my $lang = $self->get_language) { }
695 0 0 if ($dt eq "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral")
696 0 0 if ($HAS_XML_LIBXML)
698 0 0 if ($string =~ /^</u)
704 0 0 if ($@)
719 7 3 $base ? :