Branch Coverage

blib/lib/RDF/Trine/Parser/Turtle.pm
Criterion Covered Total %
branch 105 122 86.0


line true false branch
111 5 132 unless (ref $fh)
114 0 5 unless ($self->can('parse'))
116 0 0 if $pclass and $pclass->can('new')
118 0 5 unless open $fh, '<:encoding(UTF-8)', $filename
143 0 24 unless $t
146 24 0 if (defined $token_ref and ref $token_ref)
156 377 10 unless (exists $self->{'map'})
175 3749 9616 if (scalar @{$self->{'stack'};})
180 301 9282 unless $t
193 3 1534 unless ($t)
197 12 1522 unless ($t->type eq $type)
209 245 794 if ($type == 24 or $type == 26) { }
11 783 elsif ($type == 23 or $type == 25) { }
216 236 3 if ($type == 24)
224 2 237 if (my $ns = $self->{'namespaces'})
225 2 0 unless ($ns->namespace_uri($name))
234 6 4 if ($type == 23)
258 40 743 if ($type == 1) { }
4 739 elsif ($type == 3) { }
21 718 elsif (not $type == 12 || $type == 11 || $type == 13) { }
262 11 29 if ($t->type != 2)
269 0 4 if ($t->type == 4) { }
277 4 2 if ($t->type == 4) { }
292 40 718 if ($bnode_plist) { }
296 34 6 if ($t->type != 5)
313 306 24 scalar @objects ? :
326 18 1948 unless ($type == 12 or $type == 11 or $type == 9)
333 3 2163 unless $t
334 1690 473 if ($t->type == 6) { }
338 1 1693 unless ($t)
341 4 1689 if $t->type == 6
342 1397 292 if ($t->type == 12 or $t->type == 11 or $t->type == 9) { }
363 2 2195 unless $t
368 21 2164 if ($t and $t->type == 7) { }
382 588 1589 if ($self->{'canonicalize'} and &blessed($obj) and $obj->isa('RDF::Trine::Node::Literal'))
387 2613 204 if ($self->{'handle_triple'})
399 36 2491 if ($type == 1) { }
27 2464 elsif ($type == 3) { }
2 2462 elsif (not $type == 12 || $type == 11 || $type == 21 || $type == 19 || $type == 22 || $type == 20 || $type == 13 || $type == 16 || $type == 15 || $type == 14 || $type == 10) { }
402 0 36 unless ($t)
405 28 8 if ($t->type != 2)
412 0 27 unless ($t)
415 6 21 if ($t->type == 4) { }
423 20 305 if ($t->type == 4) { }
446 781 1705 if ($type == 21 or $type == 19 or $type == 22 or $type == 20) { }
451 778 0 if ($t)
452 36 742 if ($t->type == 8) { }
15 727 elsif ($t->type == 27) { }
454 36 0 if ($t->type == 12 or $t->type == 11)
474 55 4627 if ($type eq 9) { }
1599 3028 elsif ($type eq 12) { }
59 2969 elsif ($type eq 16) { }
11 2958 elsif ($type eq 15) { }
9 2949 elsif ($type eq 14) { }
8 2941 elsif ($type eq 10) { }
2860 81 elsif ($type eq 11) { }
81 0 elsif ($type eq 13) { }
0 0 elsif ($type eq 21) { }
0 0 elsif ($type eq 22) { }
496 8 2852 unless (&blessed($prefix))
525 30 31 if (defined $t->value)