Branch Coverage

blib/lib/ExtUtils/Typemaps.pm
Criterion Covered Total %
branch 128 174 73.5


line true false branch
77 0 1143 if (defined $args{'file'} and defined $args{'string'})
99 148 995 if (defined $self->{'string'}) { }
657 676 elsif (defined $self->{'file'} and -e $self->{'file'}) { }
106 0 657 unless open my $fh, "<", $self->{'file'}
122 0 0 if @_ > 1
152 66081 17 if (@_ % 2 == 1) { }
160 0 17 unless defined $ctype
162 0 17 unless defined $xstype
171 0 1 if ($args{'skip'} and $args{'replace'})
175 65540 558 if ($args{'replace'}) { }
1 557 elsif ($args{'skip'}) { }
179 1 0 if exists $self->{'typemap_lookup'}{$type->ctype}
220 54892 10 if (@_ % 2 == 1) { }
228 0 10 unless defined $xstype
230 0 10 unless defined $code
238 0 1 if ($args{'skip'} and $args{'replace'})
242 54754 148 if ($args{'replace'}) { }
1 147 elsif ($args{'skip'}) { }
246 0 1 if exists $self->{'input_lookup'}{$input->xstype}
272 54991 8 if (@_ % 2 == 1) { }
280 0 8 unless defined $xstype
282 0 8 unless defined $code
290 0 0 if ($args{'skip'} and $args{'replace'})
294 54797 202 if ($args{'replace'}) { }
0 202 elsif ($args{'skip'}) { }
298 0 0 if exists $self->{'output_lookup'}{$output->xstype}
323 0 2 unless defined $args{'string'}
343 65540 0 if (@_ > 1) { }
346 0 65540 unless defined $ctype
369 54754 0 if (@_ > 1) { }
372 0 54754 unless defined $xstype
394 54797 0 if (@_ > 1) { }
397 0 54797 unless defined $xstype
414 131744 43347 unless defined $index
421 1948687 45419 if ($lookup->{$key} > $index)
441 1 1232 if @_ % 2
445 0 1232 unless defined $ctype
449 16 1216 unless defined $index
475 1 358 if @_ % 2
480 0 2 unless defined $xstype or defined $ctype
483 0 358 if defined $xstype and defined $ctype
486 2 356 if (defined $ctype)
489 1 1 unless defined $xstype
493 5 352 unless defined $index
513 1 470 if @_ % 2
518 0 211 unless defined $xstype or defined $ctype
521 0 470 if defined $xstype and defined $ctype
524 211 259 if (defined $ctype)
527 4 207 unless defined $xstype
531 4 462 unless defined $index
547 1 0 defined $args{'file'} ? :
548 0 1 unless defined $file
551 0 1 unless open my $fh, ">", $file
571 0 38 $entry->proto ne '' ? :
576 17 7 if (@$input)
584 15 9 if (@$output)
617 0 0 if ($icand == @ident_cand)
645 0 796 if (exists $args{'typemap'} and exists $args{'file'}) { }
0 796 elsif (not exists $args{'typemap'} || exists $args{'file'}) { }
653 788 8 if exists $args{'replace'}
654 1 795 if exists $args{'skip'}
657 643 153 unless (defined $typemap)
864 1 905 if (exists $args{'ctype'} and exists $self->{'typemap_lookup'}{tidy_type($args{'ctype'})})
870 0 905 if (exists $args{'inputmap_xstype'} and exists $self->{'input_lookup'}{$args{'inputmap_xstype'}})
876 0 905 if (exists $args{'outputmap_xstype'} and exists $self->{'output_lookup'}{$args{'outputmap_xstype'}})
901 1 1 if ($args{'shallow'}) { }
945 4 168884 if (/[<>]/)
969 660 145 unless defined $lineno_offset
971 3 802 unless defined $filename
975 0 805 if $replace and $skip
977 642 163 if $replace
978 0 805 if $skip
993 8870 296021 if /^\s*#/
994 753 295268 if (/^INPUT\s*$/) { }
757 294511 elsif (/^OUTPUT\s*$/) { }
24 294487 elsif (/^TYPEMAP\s*$/) { }
1010 35862 258625 if ($section eq 'typemap') { }
203461 55164 elsif (/^\s/) { }
203 54961 elsif ($_ eq '') { }
27456 27505 elsif ($section eq 'input') { }
1013 2813 33049 if $_ eq "" or /^#/
1014 0 33049 unless my($type, $kind, $proto) = /^(.*?\S)\s+(\S+)\s*($ExtUtils::ParseXS::Constants::PrototypeRegexp*)$/o
1018 110 32939 if (length $proto)
1019 0 110 unless _valid_proto_string($proto)
1023 110 32939 length $proto ? :
1032 54961 148500 $$current eq '' ? :
1060 110 0 if ($string =~ /^$ExtUtils::ParseXS::Constants::PrototypeRegexp+$/o)