Branch Coverage

lib/File/ValueFile/Simple/Reader.pm
Criterion Covered Total %
branch 20 142 14.0


line true false branch
41 1 0 if (ref $in) { }
44 0 0 unless open $fh, "<", $in
51 0 2 if (ref $self->{$key} ne "ARRAY" and $self->{$key} ne "all")
54 0 2 if (ref $self->{$key})
56 0 0 unless ref $entry
61 0 1 if (ref $self->{'supported_features'})
66 0 1 if ($opts{'utf8'} and $opts{'utf8'} ne 'auto') { }
80 0 0 if ($str eq '!null') { }
0 0 elsif ($str eq '!empty') { }
94 1 0 if $list eq "all"
97 0 0 if $entry->ise eq $ise
107 1 0 if ($marker eq 'ValueFile') { }
0 0 elsif ($marker eq 'Feature') { }
108 0 0 if scalar @args == 4 and not defined $args[-1] and not defined $args[-2]
109 0 1 unless $line == 1
110 0 1 unless $type eq "!"
111 0 1 unless scalar @args and scalar @args <= 2
112 0 1 unless $args[0] eq "54bf8af4-b1d7-44da-af48-5278d11e8f32"
114 1 0 if (scalar @args > 1)
118 1 0 if $self->{'utf8'} eq "auto"
124 0 0 unless scalar @args == 1
128 0 0 if $type eq "!"
129 0 0 if $self->{'utf8'} eq "auto"
140 1 0 if ("File::ValueFile"->_is_utf8($id))
167 0 1 unless length $line
169 1 0 if ($line =~ s/^\!([\!\?\&])//)
172 0 1 if ($self->{'dot_repreat'}) { }
176 0 0 if ($e eq '.') { }
0 0 elsif ($e =~ s/^\.\.+$//) { }
0 0 elsif ($e =~ /^[a-zA-Z0-9\-:\._~]*$/) { }
0 0 elsif ($e =~ /^\!/) { }
194 0 0 $_ =~ /^\!/ ? :
3 0 if ($_ =~ /^[a-zA-Z0-9\-:\._~]*$/) { }
205 0 0 if ($self->{'dot_repreat'}) { }
209 0 0 if ($e eq '.') { }
0 0 elsif ($e =~ /^\.+$/) { }
0 0 elsif ($e =~ /^[a-zA-Z0-9\-:\._~]*$/) { }
0 0 elsif ($e =~ /^\!/) { }
227 0 0 $_ =~ /^\!/ ? :
0 0 if ($_ =~ /^[a-zA-Z0-9\-:\._~]*$/) { }
241 0 0 unless scalar @line == 2
242 0 0 unless defined $line[0]
243 0 0 if exists $hash{$line[0]}
257 0 0 unless scalar @line == 2
258 0 0 unless defined $line[0]
277 0 0 if (ref ${$root;}) { }
281 0 0 defined ${$root;} ? :
288 0 0 if (ref ${$root;} eq 'ARRAY') { }
0 0 elsif (defined ${$root;}) { }
291 0 0 if ref ${$root;}
311 0 0 if scalar keys %opts
319 0 0 if (Data::Identifier::eq($format, $tagpool_source_format) || Data::Identifier::eq($format, $tagpool_taglist_format_v1) and scalar @line >= 2 and defined $line[0] and defined $line[1]) { }
0 0 elsif (Data::Identifier::eq($format, $tagpool_httpd_htdirectories_format) and scalar @line == 3 and defined $line[0] and defined $line[1] and defined $line[2] and $line[0] eq 'directory') { }
0 0 elsif (not defined $format) { }
320 0 0 if ($line[0] eq 'tag' and scalar @line == 3) { }
0 0 elsif ($line[0] eq 'tag-metadata' and scalar @line == 7 and defined $line[2] and not defined $line[3] and defined $line[4] and not defined $line[5] and defined $line[6] and $line[2] eq 'ddd60c5c-2934-404f-8f2d-fcb4da88b633' and $line[4] eq 'bfae7574-3dae-425d-89b1-9c087c140c23') { }
0 0 elsif ($line[0] =~ /^tag(?:-.+)?$/ or $line[0] eq 'rule' or $line[0] eq 'filter' or $line[0] eq 'subject') { }
330 0 0 if (scalar @line > 1 and defined $line[0] and defined $line[1] and $line[0] =~ /^tag-(?:ise|metadata|relation)$/) { }
0 0 elsif ($line[0] eq 'tag' and scalar @line == 3) { }
331 0 0 if ($line[0] eq 'tag-metadata' and scalar @line == 7 and defined $line[2] and not defined $line[3] and defined $line[4] and not defined $line[5] and defined $line[6] and $line[2] eq 'ddd60c5c-2934-404f-8f2d-fcb4da88b633' and $line[4] eq 'bfae7574-3dae-425d-89b1-9c087c140c23') { }
340 0 0 unless (defined $tag)
342 0 0 if (defined $entry and $entry =~ /^(?:[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}|[0-2](?:\.(?:0|[1-9][0-9]*))+|[a-zA-Z][a-zA-Z0-9\+\.\-]+:.*)$/)
350 0 0 if (defined $tag)
354 0 0 if (defined $old)
355 0 0 if defined $old->displayname("default", undef, "no_defaults", 1)
362 0 0 if defined $as
371 1 0 if (defined $self->{'format'})
372 0 1 if defined $opts{'as'}
376 0 0 if exists $opts{'default'}
383 0 0 if defined $self->{'features'}
384 0 0 if exists $opts{'default'}