Branch Coverage

blib/lib/ExtUtils/Typemaps.pm
Criterion Covered Total %
branch 125 172 72.6


line true false branch
77 0 77 if (defined $args{'file'} and defined $args{'string'})
99 9 68 if (defined $self->{'string'}) { }
39 58 elsif (defined $self->{'file'} and -e $self->{'file'}) { }
106 0 39 unless open my $fh, "<", $self->{'file'}
122 0 0 if @_ > 1
152 2145 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 2104 58 if ($args{'replace'}) { }
1 57 elsif ($args{'skip'}) { }
179 1 0 if exists $self->{'typemap_lookup'}{$type->ctype}
220 1566 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 1535 41 if ($args{'replace'}) { }
1 40 elsif ($args{'skip'}) { }
246 0 1 if exists $self->{'input_lookup'}{$input->xstype}
272 1565 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 1537 36 if ($args{'replace'}) { }
0 36 elsif ($args{'skip'}) { }
298 0 0 if exists $self->{'output_lookup'}{$output->xstype}
323 0 2 unless defined $args{'string'}
343 2104 0 if (@_ > 1) { }
346 0 2104 unless defined $ctype
369 1535 0 if (@_ > 1) { }
372 0 1535 unless defined $xstype
394 1537 0 if (@_ > 1) { }
397 0 1537 unless defined $xstype
414 4100 1076 unless defined $index
421 47418 3457 if ($lookup->{$key} > $index)
441 1 264 if @_ % 2
445 0 264 unless defined $ctype
449 5 259 unless defined $index
475 1 58 if @_ % 2
480 0 2 unless defined $xstype or defined $ctype
483 0 58 if defined $xstype and defined $ctype
486 2 56 if (defined $ctype)
489 1 1 unless defined $xstype
493 2 55 unless defined $index
513 1 90 if @_ % 2
518 0 69 unless defined $xstype or defined $ctype
521 0 90 if defined $xstype and defined $ctype
524 69 21 if (defined $ctype)
527 1 68 unless defined $xstype
531 1 88 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 39 if (exists $args{'typemap'} and exists $args{'file'}) { }
0 39 elsif (not exists $args{'typemap'} || exists $args{'file'}) { }
653 31 8 if exists $args{'replace'}
654 1 38 if exists $args{'skip'}
657 25 14 unless (defined $typemap)
864 1 132 if (exists $args{'ctype'} and exists $self->{'typemap_lookup'}{tidy_type($args{'ctype'})})
870 0 132 if (exists $args{'inputmap_xstype'} and exists $self->{'input_lookup'}{$args{'inputmap_xstype'}})
876 0 132 if (exists $args{'outputmap_xstype'} and exists $self->{'output_lookup'}{$args{'outputmap_xstype'}})
901 1 1 if ($args{'shallow'}) { }
943 4 6034 if (/[<>]/)
967 42 6 unless defined $lineno_offset
969 3 45 unless defined $filename
973 0 48 if $replace and $skip
975 24 24 if $replace
976 0 48 if $skip
991 112 7467 if /^\s*#/
992 43 7424 if (/^INPUT\s*$/) { }
40 7384 elsif (/^OUTPUT\s*$/) { }
23 7361 elsif (/^TYPEMAP\s*$/) { }
1008 1168 6193 if ($section eq 'typemap') { }
4563 1630 elsif (/^\s/) { }
45 1585 elsif ($_ eq '') { }
793 792 elsif ($section eq 'input') { }
1011 87 1081 if $_ eq "" or /^#/
1012 0 1081 unless my($type, $kind, $proto) = /^(.*?\S)\s+(\S+)\s*($ExtUtils::ParseXS::Constants::PrototypeRegexp*)$/o
1016 1081 0 unless $proto
1017 0 1081 unless _valid_proto_string($proto)
1027 1585 2978 $$current eq '' ? :
1055 1081 0 if ($string =~ /^$ExtUtils::ParseXS::Constants::PrototypeRegexp+$/o)