Branch Coverage

blib/lib/ExtUtils/ParseXS.pm
Criterion Covered Total %
branch 69 90 76.6


line true false branch
241 19 0 if (eval "require Hash::Util; 1;")
251 333 0 unless (ref $self)
252 333 0 if ($USING_FIELDS) { }
270 315 1 if (@_ % 2) { }
272 313 2 ref $invocant ? :
309 0 316 if ($^O eq "VMS")
329 0 316 unless $Options{'filename'}
333 302 14 if (ref $Options{'filename'}) { }
339 302 0 unless $Options{'outfile'}
351 4 312 unless (ref $Options{'output'})
352 0 4 unless open my $fh, "> $Options{'output'}"
365 314 2 if ($self->{'config_WantLineNumbers'}) { }
368 305 9 if ($Options{'outfile'}) { }
373 0 9 unless $cfile =~ s/\.xs$/$csuffix/i
396 302 14 if ref $opfn
397 0 316 unless open $self->{'in_fh'}, "<", $fn
402 0 285 unless $AST->parse($self)
408 281 2 if tied *PSEUDO_STDOUT
416 1 1 if (@_) { }
447 1028 526 if defined $num
459 0 0 if not /^\"/ and length $_ > 0
478 0 1 if (defined $command and $command =~ /\s/ and not $command =~ /[$quote]/)
500 0 61272 unless (s/^(\s*)\|//)
504 0 61272 if $pre =~ /\t/
507 58085 3187 if (defined $first) { }
508 0 58085 if $pre ne $first
620 288 1286 unless defined $self->{'lastline'}
639 3 3943 if ($self->{'lastline'} =~ /^=/)
641 3 3 if $self->{'lastline'} =~ /^=cut\s*$/
644 0 3 unless defined $self->{'lastline'}
650 294 3649 if ($self->{'lastline'} =~ /^TYPEMAP\s*:/)
655 147 147 if @{$self->{'line'};}
658 1 146 unless $self->{'lastline'} =~ /^TYPEMAP\s*:\s*<<\s*(?:(["'])(.+?)\1|([^\s'"]+?))\s*;?\s*$/
661 3 143 defined $1 ? :
669 145 1679 if $self->{'lastline'} =~ /^$end_marker\s*$/
675 1 145 unless defined $self->{'lastline'}
683 3 3646 if ($self->{'lastline'} =~ /^\s*#/ and not $self->{'lastline'} =~ /^\#[ \t]* (?: (?:if|ifn?def|elif|else|endif|elifn?def| define|undef|pragma|error| warning|line\s+\d+|ident) \b | (?:include(?:_next)?|import) \s* ["<] .* [>"] ) /x)
711 640 1468 if $self->{'lastline'} =~ /^\S/ and @{$self->{'line'};} and $self->{'line'}[-1] eq ""
721 52 2954 if ($self->{'lastline'} =~ /^#[ \t]*(if|ifn?def|elif|else|endif|elifn?def)\b/)
753 43 9 if (not @{$self->{'line'};}) { }
761 0 9 if $type =~ /^if/
765 9 0 unless $if_level
766 0 0 if $type eq "endif"
779 310 2838 unless defined($self->{'lastline'} = readline $self->{'in_fh'})
787 178 2660 if ($final)