Branch Coverage

blib/lib/RDF/NS.pm
Criterion Covered Total %
branch 59 90 65.5


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/) { }
50 0 37770 if /^#/
52 94 37676 if $namespace =~ m[^https?://example\.\w+?/]
53 17 37659 if $date and $at ne 'any' and $date > $at
64 27 0 if ($from // 'any') eq 'any'
66 0 27 unless -f $from
68 0 27 unless open my $fh, '<', $from
75 0 37661 if ($prefix =~ /^(isa|can|new|uri)$/) { }
37660 1 elsif ($prefix =~ /^[a-z][a-z0-9]*$/) { }
0 1 elsif ($warn) { }
76 0 0 if $warn
78 37660 0 if ($namespace =~ /^[a-z][a-z0-9]*:[^"<>]*$/) { }
0 0 elsif ($warn) { }
100 0 13 if $format =~ /^n(otation)?3$/i
101 1 12 if (lc($format) =~ /$FORMATS/) { }
12 0 elsif ($format eq '') { }
112 2 1302 if $uri eq $self->{$prefix}
121 2 694 if $uri eq $namespace
169 39 0 @_ ? :
171 34 5 if (wantarray) { }
190 1 7 if $_[0] =~ /^<([a-zA-Z][a-zA-Z+.-]*:.+)>$/
191 3 4 if $_[0] =~ /^_(:.*)?$/
192 0 4 unless (shift()) =~ /^([a-z][a-z0-9]*)?([:_]([^:]+))?$/
193 3 1 defined $1 ? :
194 0 4 unless defined $ns
195 0 4 unless $3
201 29 23 unless $AUTOLOAD =~ /^.*::([a-z][a-z0-9]*)?(_([^:]+)?)?$/
202 1 1 defined $3 ? :
2 21 unless $1
203 0 21 unless my $ns = $self->{$1}
204 7 14 defined $3 ? :
205 12 9 unless defined $local
212 0 0 unless $date and $date =~ /$DATE_REGEXP/
219 0 0 unless open my $fh, '>>', $file
223 0 0 if (not exists $old->{$prefix}) { }
0 0 elsif ($old->{$prefix} ne $namespace) { }
233 0 0 unless (exists $self->{$prefix})