Branch Coverage

blib/lib/ExtUtils/ParseXS.pm
Criterion Covered Total %
branch 67 90 74.4


line true false branch
242 28 0 if (eval "require Hash::Util; 1;")
252 461 0 unless (ref $self)
253 461 0 if ($USING_FIELDS) { }
271 433 0 if (@_ % 2) { }
273 431 2 ref $invocant ? :
310 0 433 if ($^O eq "VMS")
330 0 433 unless $Options{'filename'}
334 427 6 if (ref $Options{'filename'}) { }
340 427 0 unless $Options{'outfile'}
352 4 429 unless (ref $Options{'output'})
353 0 4 unless open my $fh, "> $Options{'output'}"
366 431 2 if ($self->{'config_WantLineNumbers'}) { }
369 430 1 if ($Options{'outfile'}) { }
374 0 1 unless $cfile =~ s/\.xs$/$csuffix/i
397 427 6 if ref $opfn
398 0 433 unless open $self->{'in_fh'}, "<", $fn
403 0 371 unless $AST->parse($self)
409 369 2 if tied *PSEUDO_STDOUT
417 1 1 if (@_) { }
448 1148 645 if defined $num
460 0 0 if not /^\"/ and length $_ > 0
479 0 3 if (defined $command and $command =~ /\s/ and not $command =~ /[$quote]/)
501 0 79653 unless (s/^(\s*)\|//)
505 0 79653 if $pre =~ /\t/
508 75422 4231 if (defined $first) { }
509 0 75422 if $pre ne $first
621 376 1674 unless defined $self->{'lastline'}
640 3 4900 if ($self->{'lastline'} =~ /^=/)
642 3 3 if $self->{'lastline'} =~ /^=cut\s*$/
645 0 3 unless defined $self->{'lastline'}
651 336 4564 if ($self->{'lastline'} =~ /^TYPEMAP\s*:/)
656 168 168 if @{$self->{'line'};}
659 1 167 unless $self->{'lastline'} =~ /^TYPEMAP\s*:\s*<<\s*(?:(["'])(.+?)\1|([^\s'"]+?))\s*;?\s*$/
662 4 163 defined $1 ? :
670 167 1799 if $self->{'lastline'} =~ /^$end_marker\s*$/
676 0 167 unless defined $self->{'lastline'}
684 7 4557 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)
712 870 1899 if $self->{'lastline'} =~ /^\S/ and @{$self->{'line'};} and $self->{'line'}[-1] eq ""
722 50 3637 if ($self->{'lastline'} =~ /^#[ \t]*(if|ifn?def|elif|else|endif|elifn?def)\b/)
754 40 10 if (not @{$self->{'line'};}) { }
762 0 10 if $type =~ /^if/
766 10 0 unless $if_level
767 0 0 if $type eq "endif"
780 429 3425 unless defined($self->{'lastline'} = readline $self->{'in_fh'})
788 196 3229 if ($final)