Branch Coverage

blib/lib/RDF/NS.pm
Criterion Covered Total %
branch 57 88 64.7


line true false branch
19 0 28 ref $_[0] ? :
20 18 10 @_ % 2 ? :
24 0 28 if exists $options{'from'}
25 10 18 if not $from or $from eq 1
27 1 27 if ((ref $from || '') eq "HASH")
30 1 1 unless ($self->SET($prefix, $self->{$prefix}, $warn))
37 16 11 if ($from =~ /$DATE_REGEXP/) { }
1 10 elsif ($at =~ /$DATE_REGEXP/) { }
0 10 elsif (not $at =~ /any/) { }
52 0 46930 if /^#/
54 17 46913 if $date and $at ne "any" and $date > $at
65 27 0 if ($from // "any") eq "any"
67 0 27 unless -f $from
69 0 27 unless open my $fh, "<", $from
76 0 46915 if ($prefix =~ /^(isa|can|new|uri)$/) { }
46914 1 elsif ($prefix =~ /^[a-z][a-z0-9]*$/) { }
0 1 elsif ($warn) { }
77 0 0 if $warn
80 46914 0 if ($namespace =~ /^[a-z][a-z0-9]*:[^"<>]*$/) { }
0 0 elsif ($warn) { }
104 0 13 if $format =~ /^n(otation)?3$/i
105 1 12 if (lc($format) =~ /$FORMATS/) { }
12 0 elsif ($format eq '') { }
117 2 1306 if $uri eq $self->{$prefix}
126 2 696 if $uri eq $namespace
176 39 0 @_ ? :
178 34 5 if (wantarray) { }
198 1 7 if $_[0] =~ /^<([a-zA-Z][a-zA-Z+.-]*:.+)>$/
199 3 4 if $_[0] =~ /^_(:.*)?$/
200 0 4 unless (shift()) =~ /^([a-z][a-z0-9]*)?([:_]([^:]+))?$/
201 3 1 defined $1 ? :
202 0 4 unless defined $ns
203 0 4 unless $3
209 29 23 unless $AUTOLOAD =~ /^.*::([a-z][a-z0-9]*)?(_([^:]+)?)?$/
210 1 1 defined $3 ? :
2 21 unless $1
211 0 21 unless my $ns = $self->{$1}
212 7 14 defined $3 ? :
213 12 9 unless defined $local
220 0 0 unless $date and $date =~ /$DATE_REGEXP/
227 0 0 unless open my $fh, ">>", $file
231 0 0 if (not exists $old->{$prefix}) { }
0 0 elsif ($old->{$prefix} ne $namespace) { }
243 0 0 unless (exists $self->{$prefix})