Branch Coverage

blib/lib/Text/PerlPP.pm
Criterion Covered Total %
branch 143 200 71.5


line true false branch
131 214 570 if (scalar @{$self->{'OutputBuffers'};} == 0)
133 0 214 unless open $self->{'RootSTDOUT'}, ">&STDOUT"
137 0 784 unless open STDOUT, ">>", \$self->{'OutputBuffers'}[0][1]
150 202 570 if (scalar @{$self->{'OutputBuffers'};} == 0) { }
151 0 202 unless open STDOUT, ">&", $self->{'RootSTDOUT'}
154 0 570 unless open STDOUT, ">>", \$self->{'OutputBuffers'}[0][1]
217 90 263 if $self->{'Defs_RE'}
236 4 80 if ($cmd =~ /^include\s++(?:['"](?[^'"]+)['"]|(?\S+))\s*$/i) { }
8 72 elsif ($cmd =~ /^macro\s++(.*+)$/is) { }
4 68 elsif ($cmd =~ /^immediate\s++(.*+)$/is) { }
1 67 elsif ($cmd =~ /^prefix\s++(\S++)\s++(\S++)\s*+$/i) { }
4 63 elsif ($cmd =~ /^define\s++(.*+)$/i) { }
2 61 elsif ($cmd =~ /^undef\s++(?\S++)\s*+$/i) { }
3 58 elsif ($cmd =~ /^ifdef\s++(?\S++)\s*+$/i) { }
0 58 elsif ($cmd =~ /^ifndef\s++(?\S++)\s*+$/i) { }
15 43 elsif ($cmd =~ /^if\s++(.*+)$/i) { }
7 36 elsif ($cmd =~ /^(elsif|elseif|elif)\s++(.*+)$/) { }
18 18 elsif ($cmd =~ /^else\s*+$/i) { }
18 0 elsif ($cmd =~ /^endif\s*+$/i) { }
259 0 8 if ($self->{'Opts'}{'DEBUG'})
269 0 8 if ($self->{'Opts'}{'DEBUG'}) { }
270 0 0 if $err
272 0 8 if $err
286 0 4 if ($self->{'Opts'}{'DEBUG'})
295 0 4 if ($self->{'Opts'}{'DEBUG'}) { }
296 0 0 if $err
298 0 4 if $err
307 0 4 unless ($test =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)\s*+(?.*+)$/i)
316 1 3 unless length $rest
322 0 2 unless $nm =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)$/i
328 0 3 unless $nm =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)$/i
333 0 0 unless $nm =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)$/i
338 0 15 unless ($test =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)\s*+(?.*+)$/i)
349 0 7 unless ($test =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)\s*+(?.*+)$/i)
375 0 6 if ($status == -1) { }
0 6 elsif ($status & 127) { }
2 4 elsif ($status != 0) { }
378 0 0 $status & 128 ? :
390 0 6 unless $cmd
393 1 5 $self->{'Opts'}{'KEEP_GOING'} ? :
419 33 437 $self->{'Opts'}{'DEBUG_LINENOS'} ? :
436 8 205 if ($after =~ /^"/ and $plainMode == 1) { }
442 49 156 if ($after =~ /^=/) { }
84 72 elsif ($after =~ /^:/) { }
11 61 elsif ($after =~ /^#/) { }
1 60 elsif ($after =~ m[^\/]) { }
53 7 elsif ($after =~ /^(?:\s|$)/) { }
6 1 elsif ($after =~ /^!/) { }
0 1 elsif ($after =~ /^"/) { }
472 2 202 if ($plainMode == 1) { }
482 0 212 unless $after
497 8 204 if ($inside =~ /"$/) { }
503 49 155 if ($insetMode == 3) { }
84 71 elsif ($insetMode == 4) { }
11 60 elsif ($insetMode == 5) { }
54 6 elsif ($insetMode == 2) { }
6 0 elsif ($insetMode == 6) { }
530 2 202 if ($self->GetModeOfOB == 1)
563 224 338 if ($withinTag) { }
564 212 12 if ($$contents_ref =~ /^(.*?)\?\>(.*)$/s)
579 213 125 if ($$contents_ref =~ /^(.*?)\<\?(.*)$/s)
583 212 1 if ($withinTag)
589 12 126 if ($withinTag)
595 3 9 if $self->GetModeOfOB == 2
614 0 126 if ($self->GetModeOfOB == 1)
637 23 103 if ($fname) { }
638 0 23 unless open $f, "<", $fname
639 23 0 if ($fname =~ m[^(.*)[\\\/][^\\\/]+$])
658 23 103 if ($wdir)
689 0 92 if ($fname) { }
690 0 0 unless open $out_fh, ">", $fname
692 0 92 unless open $out_fh, ">&STDOUT"
695 0 92 unless close $out_fh
745 0 114 $0 =~ /\bperlpp$/ ? :
761 2 112 if ($noexit_on_help) { }
763 0 2 unless $ok
766 0 2 if have("usage")
767 2 0 if have("h")
768 0 0 if have("man")
772 0 112 unless $ok
775 0 112 if have("usage")
776 0 112 if have("h")
777 0 112 if have("man")
790 0 32 unless $k =~ /^(?[[:alpha:]][[:alnum:]_]*|[[:alpha:]_][[:alnum:]_]+)$/i
802 0 114 unless my $self = shift()
805 2 112 unless (_parse_command_line($lrArgv, $self->{'Opts'}))
809 2 110 if ($self->{'Opts'}{'PRINT_VERSION'})
811 0 2 $3 ? :
813 0 2 if ($self->{'Opts'}{'PRINT_VERSION'} > 1)
841 3 107 if $self->{'Opts'}{'DEBUG_LINENOS'}
858 13 19 if $val eq ""
868 0 32 if $@
876 29 81 if (%{$self->{'Opts'}{'DEFS'};})
885 13 19 $@ || !defined($v) ? :
894 0 5 if $@
903 0 5 unless (defined $val)
905 0 5 if $val eq ""
916 5 105 if ($self->{'Opts'}{'EVAL'})
927 6 104 if ($self->{'Opts'}{'DEBUG'}) { }
938 12 92 if ($result) { }