Branch Coverage

blib/lib/Text/Vpp.pm
Criterion Covered Total %
branch 149 212 70.2


line true false branch
54 4 11 if (defined $ref and ref $ref eq 'HASH')
59 3 12 defined $action ? :
60 3 12 defined $comment ? :
61 12 3 unless defined $prefix
65 3 12 defined $backslash ? :
66 1 14 if (UNIVERSAL::can($file, 'getline')) { }
70 0 14 unless $$self{'fileDesc'}->open($file)
100 9 2 ref $out ? :
103 0 11 if ($@ ne '')
117 42 0 if (defined $$self{'var'}{$2}) { }
118 42 0 !$1 ? :
133 0 41 if ($@ ne '')
157 1 15 if (defined $fileOut) { }
159 1 0 if (UNIVERSAL::can($fileOut, 'print')) { }
167 0 0 unless $fileOut =~ /^>/
169 0 0 unless ($SubsOut->open($FileOut))
205 0 3 if $? > 0
217 21 71 unless $globExpand
226 63 29 $$self{'IF_Level'} == 0 || $EnterLoop ? :
265 49 43 if ($useFiFo) { }
272 9 34 if $ScanOnly
277 33 299 if ($Within_Perl_Input)
278 2 31 if ($line =~ /$Perl_Input_Termination/) { }
280 2 0 if ($expand)
284 0 2 if ($nseq > $num) { }
285 0 2 if $@
295 3 296 if ($Within_Shell_Input)
296 1 2 if ($line =~ /$Shell_Input_Termination/) { }
298 1 0 if $expand
307 8 288 if defined $commentPat and $line =~ /$commentPat/
311 5 283 if ($backslash == 1 and $line =~ s/\\\s*$//)
318 5 278 if (defined $keep) { }
329 29 254 if ($lineIn =~ s/$ifPat//i) { }
2 252 elsif ($lineIn =~ s/$elsifPat//) { }
6 246 elsif ($lineIn =~ /$elsePat/) { }
29 217 elsif ($lineIn =~ /$endifPat/) { }
27 190 elsif ($lineIn =~ s/$foreachPat//) { }
47 143 elsif ($lineIn =~ /$endforPat/) { }
3 140 elsif ($lineIn =~ /$includePat/) { }
9 131 elsif ($lineIn =~ s/$evalPat//) { }
2 129 elsif ($lineIn =~ s/$perlPat//) { }
3 126 elsif ($lineIn =~ s/$shellPat//) { }
1 125 elsif ($lineIn =~ /$quotePat/) { }
125 0 elsif ($SubsIt = $lineIn =~ /$subsLeadPat/ || !($lineIn =~ /$actionPat/)) { }
338 0 29 if ($$self{'IF_Level'} != $Current_IF_Level)
347 0 2 unless ($stage == 1 or $stage == 2)
352 0 2 if ($done) { }
362 0 6 if ($stage == 0 or $stage == 3)
371 0 29 if ($stage == 0)
380 15 12 if ($expand)
385 15 0 if $LoopExpr =~ s/\$(\w+)//
389 0 15 if ($@)
396 14 1 unless ($emptyLoop)
398 3 11 if ($$self{'FOR_Level'} == 0) { }
403 0 3 if ($Current_FOR_Level != $$self{'FOR_Level'})
420 0 31 if ($Current_FOR_Level != $$self{'FOR_Level'})
429 13 14 if ($emptyLoop)
431 3 10 if ($$self{'FOR_Level'} == 0) { }
441 0 13 if ($Current_FOR_Level != $$self{'FOR_Level'})
454 3 0 if ($expand)
459 1 2 $lineIn =~ /^[\w_\-.]+$/ ? :
462 1 2 if (ref $Incl eq 'HASH') { }
464 0 1 unless defined $$Incl{'action'}
465 0 1 unless defined $$Incl{'comment'}
466 0 1 unless defined $$Incl{'prefix'}
467 1 0 unless defined $$Incl{'suffix'}
468 1 0 unless defined $$Incl{'substitute'}
469 1 0 unless defined $$Incl{'backslash'}
470 0 1 unless (defined $$Incl{'file'})
488 3 0 if ($newFile->substitute) { }
505 9 0 if ($expand)
543 1 2 if ($lineIn =~ s/<<\s*//) { }
560 1 0 if ($Str =~ /^\(/)
562 1 0 if ($Str =~ /^\(\s*(\S)([^\1]*?)\1\s*(?:,\s*(\S)([^\2]*?)\3\s*\))?/) { }
570 0 6 if ($useFiFo) { }
574 0 6 if $ScanOnly
576 1 5 if $line =~ /$endquotePat/
578 0 5 unless (defined $line)
584 5 0 if $expand
587 1 0 if ($expand)
590 1 0 unless ("$prefix$suffix" =~ /\$/ or defined $ListPrefix and $ListPrefix =~ /\$/)
594 1 0 unless ("$prefix$suffix" =~ /\@/ or defined $ListPrefix and $ListPrefix =~ /\@/)
598 1 0 if (defined $ListPrefix)
601 1 0 if (defined $suffix) { }
608 0 0 !$1 ? :
611 1 0 if (defined $ListSeparator) { }
615 0 1 if ($@ ne '')
628 93 32 if ($expand)
630 93 0 if ($SubsIt)
636 1 92 if (defined $suffix) { }
639 0 0 if (defined $$self{'var'}{$1}) { }
647 68 0 if (defined $$self{'var'}{$2}) { }
648 66 2 !$1 ? :
664 71 185 if ($useFiFo) { }
669 14 171 if $ScanOnly
674 0 16 if ($$self{'IF_Level'} > 0) { }
0 16 elsif ($$self{'FOR_Level'} > 0) { }
1013 0 7 if (ref $_[0] eq 'HASH') { }
1037 0 1 if (UNIVERSAL::can($file, 'getline')) { }
1044 0 1 unless my $Input = 'IO::File'->new($file)
1082 16 1 unless defined $$self{'substitute'}
1095 15 0 if (defined $comment) { }
1121 0 18 if (defined($suffix = $$self{'suffix'})) { }
1144 1 15 if (defined $suffix) { }
1163 0 32 if defined $subs and ref $subs ne 'ARRAY'
1168 1 31 if (defined $subs) { }