Branch Coverage

blib/lib/RDF/LDF.pm
Criterion Covered Total %
branch 85 122 69.6


line true false branch
57 1 2 ref $self->url ? :
59 0 5 unless $self->get_query_pattern($part)
72 1 6 unless (defined $bgp)
76 4 2 $bgp->isa('RDF::Trine::Statement') || $bgp->isa('RDF::Query::Algebra::Filter') ? :
80 0 6 unless (@triples)
92 2 10 unless $b
121 14 14 unless (defined $it)
125 0 14 unless $it
131 10 18 unless $this_binding
135 10 8 unless @$bgps
163 0 14 unless _is_array_ref($bgps) and @$bgps > 0
167 0 14 unless defined $pattern
177 20 22 $pattern->{$_} =~ /^\?/ ? :
183 10 18 unless defined $triple
201 0 8 unless _is_array_ref($bgps) and @$bgps > 0
209 8 16 if (defined $val and $binding->{$val})
239 0 14 unless @$triples > 0
242 12 2 if (@$triples == 1)
252 0 4 if ($count == 0) { }
2 2 elsif (not defined $best_count or $count < $best_count) { }
263 0 2 unless defined $best_pattern
265 2 2 Data::Compare::Compare($_, $best_pattern) ? :
285 0 4 unless $iterator
295 32 0 if (_is_blessed($node) and $node->isa('RDF::Trine::Node'))
296 16 16 if ($node->isa('RDF::Trine::Node::Variable')) { }
0 16 elsif ($node->isa('RDF::Trine::Node::Literal')) { }
334 0 42 unless defined $fragment
340 0 42 unless _is_hash_ref($info)
342 0 42 unless $info->{'hydra_template'}
345 590 126 unless _is_hash_ref($info->{$_}) and $info->{$_}{'hydra_property'}
352 0 42 unless $pattern->{'rdf_subject'}
353 0 42 unless $pattern->{'rdf_predicate'}
354 0 42 unless $pattern->{'rdf_object'}
368 0 19 if (@triple == 3) { }
18 1 elsif (_is_hash_ref($triple[0])) { }
377 0 0 if _is_blessed($subject) and $subject->isa('RDF::Trine::Node') and not $subject->is_variable
378 0 0 if _is_blessed($predicate) and $predicate->isa('RDF::Trine::Node') and not $predicate->is_variable
379 0 0 if (_is_blessed($object) and $object->isa('RDF::Trine::Node') and not $object->is_variable)
380 0 0 $object->isa('RDF::Trine::Node::Literal') ? :
384 9 10 ref $self->url ? :
389 0 37 unless defined $pattern
392 36 1 if _is_string($subject)
393 36 1 if _is_string($predicate)
394 36 1 if _is_string($object)
409 37 7 unless (defined $model)
412 6 31 unless defined $url or defined($url = pop @federated)
416 0 31 unless defined $fragment->{'model'}
427 23 15 unless ($iterator->peek)
433 5 23 wantarray ? :
443 49 24 if (my $cache = $self->lru->get($url))
450 24 0 if (defined $model)
465 0 24 unless $url
482 0 24 if ($@)
504 24 0 if ($opts{'clean'})
529 144 0 if ($opts{'clean'})
537 24 0 if _is_array_ref($info->{'dct_source'})
539 24 0 if ($source)
544 24 0 if ($opts{'clean'})
578 144 477 if ($qname =~ /^(hydra_variable|hydra_property)$/) { }
72 405 elsif ($qname eq 'hydra_mapping') { }
237 168 elsif ($qname =~ /^(void|hydra)_/) { }