Branch Coverage

blib/lib/File/ANVL.pm
Criterion Covered Total %
branch 66 160 41.2


line true false branch
92 1 0 unless ($reader)
123 3 1 $substance ? :
140 0 0 unless ref $reader eq 'CODE'
157 0 0 $substance ? :
209 0 0 unless defined $s
237 5 0 if ref $r_wslines eq 'SCALAR'
240 5 0 if ref $r_rrlines eq 'SCALAR'
248 2 3 unless $rec
263 0 1 unless defined $record
265 0 1 if ref $r_elems ne 'ARRAY'
269 1 0 unless defined $strict
274 1 0 unless /\n$/
276 0 1 if /\n\n/
279 0 1 unless /^[^\s:][\w \t]*:/
282 1 0 if $anvl_mode ne 2
296 0 1 if ($indented)
297 0 0 if $strict
329 0 10 unless defined $record
331 1 9 if ref $r_elems ne 'ARRAY'
337 6 3 unless defined $linenum
338 0 9 if $linenum =~ /\D/
342 0 9 if ref $o ne 'HASH'
348 9 0 unless /\n$/
393 8 1 unless $$o{'comments'} and s/^(\d+):#/$1##:/gm, 1
406 0 9 if /^\s*$/s
422 3 6 if ($indented)
423 1 2 unless ($$o{'autoindent'})
457 0 8 unless defined $$r_elems[2]
467 1 7 if $$r_elems[2] =~ /^(\d+): (.*)/
488 1 2 if ref $r_elems ne 'ARRAY'
490 1 1 if ref $r_hash ne 'HASH'
492 1 0 unless defined $first_only
495 0 1 if $num_elems % 3 != 0
498 0 1 if $num_elems < 1
508 1 0 if ($$r_elems[2])
513 0 1 unless not defined $$r_hash{$name} and $$r_hash{$name} = [0]
522 1 3 unless not defined $$r_hash{$name} and $$r_hash{$name} = [$n]
534 0 5 unless defined $value
536 1 4 if ref $r_svals ne 'ARRAY'
559 0 4 $warning ? :
566 0 2 unless defined $record
568 1 1 if ref $r_hash ne 'HASH'
573 0 1 if $msg = anvl_recsplit($record, \@elems, $strict)
579 1 1 unless defined $name
581 1 0 unless (defined $$r_hash{$name})
590 0 0 if $strict
604 0 0 unless ref $v
667 1 6 unless s/\G \%\{ (.*?) \%\}//sx
686 1 0 unless (%anvl_encoding)
701 0 6 if $name =~ /^\s*$/
707 8 1 if $name =~ s/^(.*),\s*([^,]+)(,*$)/$1$3/
745 4 17 unless defined $lineno
747 15 2 if $name ne 'erc' or $value =~ /^\s*$/
753 0 2 if $msg = anvl_valsplit($value, \@svals)
820 0 0 unless ref($om) =~ /^File::OM::/
828 0 0 $p ? :
840 0 0 unless $p and $st &&= $s, 1
857 0 0 unless $anvlrec
876 0 0 if $msg =~ /^error/
877 0 0 unless $msg eq ''
886 0 0 if $$o{'find'} and not $anvlrec =~ /$$o{'find'}/m
897 0 0 if (ref $$o{'elemsproc'} eq 'CODE' and !($pat = $$o{'elemsprocpat'}) || $anvlrec =~ /$pat/)
903 0 0 if $msg = &{$$o{'elemsproc'};}($r_elems)
906 0 0 if ref $om eq 'File::OM::Turtle'
921 0 0 unless $p and $st &&= $s, 1
923 0 0 if ($r_elem_order) { }
925 0 0 if $msg = anvl_arrayhash($r_elems, \%rechash)
930 0 0 $$r_elems[2] ? :
950 0 0 if ($r_elem_order) { }
953 0 0 if $ne >= $nemax
961 0 0 unless defined $elem_name and defined($n = $rechash{$elem_name}[0])
970 0 0 if $n >= $nmax
975 0 0 $n < 3 ? :
980 0 0 unless $name eq '#'
983 0 0 if $$o{'show'} and not "${name}: $value" =~ /$$o{'show'}/m
991 0 0 if $$o{'invert'} and $value =~ /,\s*$/
996 0 0 unless $p and $st &&= $s, 1
1000 0 0 unless $p and $st &&= $s, 1
1008 0 0 unless $p and $st &&= $s, 1
1043 0 0 $j < $#$r_elems && $subjpat ? :