Branch Coverage

blib/lib/Parser/MGC.pm
Criterion Covered Total %
branch 92 104 88.4


line true false branch
177 0 46 unless $class->can($toplevel)
188 1 45 if ($args{'accept_0o_oct'})
192 1 45 if (defined $self->{'patterns'}{'comment'}) { }
226 5 138 unless $self->at_eos
259 0 3 unless defined $file
264 2 1 if (ref $file) { }
268 0 1 unless open $fh, "<", $file
271 0 3 if $opts{'binmode'}
329 0 1 unless $self->at_eos
393 6 43 unless defined $pos
398 1 48 if $sol > 0 and substr($str, $sol, 1) =~ /^[\r\n]$/u
453 251 2 if &Scalar::Util::blessed($_[0])
513 162 434 if (pos $self->{'str'} >= length $self->{'str'}) { }
114 320 elsif (defined $self->{'endofscope'}) { }
666 73 0 unless ref $stop
668 65 8 if defined $start
670 16 18 if $commit_if_started
739 16 56 if defined $sep
762 32 71 if (defined $sep)
764 15 17 unless $self->{'str'} =~ /\G$sep/cgu
917 69 0 if ($self->{'committer'}) { }
941 1064 222 if pos $self->{'str'} < length $self->{'str'}
943 218 4 unless $self->{'reader'}
946 3 1 if (defined $more)
997 11 360 unless ref $expect
1000 161 210 unless $self->{'str'} =~ /\G$expect/cgu
1002 188 22 unless wantarray
1003 36 1 defined $-[$_] ? :
1011 271 84 unless ref $expect
1013 31 324 if (wantarray) { }
1014 11 20 unless my(@ret) = $self->maybe_expect($expect)
1019 139 185 unless defined(my $ret = $self->maybe_expect($expect))
1102 31 10 unless ref $expect
1104 4 37 defined $self->{'endofscope'} ? :
1112 38 3 if ($self->{'str'} =~ /\G(?s:.*?)($endre)/u) { }
1119 1 40 if $fail_if_empty and $end == $start
1171 0 230 if $self->at_eos
1174 61 169 unless $self->{'str'} =~ /\G$re/cgu
1179 123 46 $convert ? :
1188 226 0 $args{'pattern'} ? :
1212 1 103 $int =~ s/^-//u ? :
1216 5 99 if $int =~ /^0/u
1302 1 52 if $self->at_eos
1307 20 32 unless $self->{'str'} =~ /\G($self->{'patterns'}{'string_delim'})/cgu
1322 0 32 unless $self->{'str'} =~ / \G( (?: \\[0-7]{1,3} # octal escape |\\x[0-9A-F]{2} # 2-digit hex escape |\\x\{[0-9A-F]+\} # {}-delimited hex escape |\\. # symbolic escape |[^\\$delim]+ # plain chunk )*? )$delim/cgiux
1329 7 0 exists $escapes{$4} ? :
1 7 defined $3 ? :
1 8 defined $2 ? :
2 9 defined $1 ? :
1370 0 2 unless defined(my $kw = $self->token_ident)
1374 1 1 unless grep {$_ eq $kw;} @acceptable
1406 2 41 defined $filename && !ref($filename) ? :