Branch Coverage

File:lib/ExtUtils/OOParseXS.pm
Coverage:51.3%

line%coveragebranch
19100TFunless $$args{'filename'}
40100TF$args{'except'} ? :
42100TFdefined $args{'typemap'} ? :
100TFref $args{'typemap'} ? :
4950TFif ($^O eq 'VMS')
79100TFif ($data{'linenumbers'})
80100TFif (not ref $data{'output'}) { }
85100TFunless $data{'cfile'} =~ s/\.xs$/$data{'csuffix'}/i
107100TFunless -r $typemap
118100TFunless -f $typemap
120100TFunless (-T $typemap)
12450TFunless open my $TYPEMAP, '<', $typemap
132100TFif /^\s*#/
133100TFif (/^INPUT\s*$/)
136100TFif (/^OUTPUT\s*$/)
139100TFif (/^TYPEMAP\s*$/)
142100TFif ($mode eq 'Typemap') { }
100TFelsif (/^\s/) { }
100TFelsif ($mode eq 'Input') { }
150100TFif /^\s*$/
151100TFunless my($type, $kind, $proto) = /^\s*(.*?\S)\s+(\S+)\s*($$self{'proto_re'}*)\s*$/
15850TFunless $proto
16050TFunless $self->ValidProtoString($proto)
17850TFunless close $TYPEMAP
223100TFif $t
269100TFif $$self{'linenumbers'}
28050TFunless open $IN, '<', $$self{'base'}
284100TFif (/^=/)
287100TFif (/^=cut\s*$/)
303100TFif $$self{'linenumbers'}
3120TFunless $$self{'lastline'}
315100TFif ($$self{'Package'}, $$self{'Prefix'}) = /^MODULE\s*=\s*[\w:]+(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/
320100TFunless (defined $_)
330100TFif $$self{'linenumbers'}
386100TFif $$self{'linenumbers'}
400100TFif (not ref $$self{'output'})
40250TFunless open my $fh_out, '>', $$self{'output'}
408100TFif ($$self{'linenumbers'}) { }
409100TFif ($$self{'outfile'}) { }
414100TFunless $$self{'cfile'} =~ s/\.xs$/$$self{'csuffix'}/i
450100TFunless $l =~ /^\#\s*((if)(?:n?def)?|elsif|else|endif)\b/
45250TFif ($statement eq 'if') { }
4610TFif $$self{'XSStack'}[-1]{'type'} ne 'if'
4630TFif ($$self{'XSStack'}[-1]{'varname'})
4690TFif ($statement ne 'endif') { }
488100TFunless @{$$self{'line'};}
489100TFif ($$self{'XSS_work_idx'} and not $$self{'XSStack'}[$$self{'XSS_work_idx'}]{'varname'})
49950TFif $$self{'line'}[0] =~ /^\s/
54350TFunless @{$$self{'line'};}
547100TFif (($kwd, $thisline) = $self->check_keyword($thisline, 'BOOT') and $kwd)
55150TFif $$self{'linenumbers'} and not $$self{'line'}[0] =~ /^\s*#\s*line\b/
55950TFif $$self{'ret_type'} =~ s/^NO_OUTPUT\s+//
56650TFif ($$self{'argtypes'} and $$self{'ret_type'} =~ s/^(.*?\w.*?)\s*\b(\w+\s*\(.*)/$1/s)
573100TFunless (@{$$self{'line'};})
57850TFif $$self{'ret_type'} =~ s/^extern "C"\s+//
57950TFif $$self{'ret_type'} =~ s/^static\s+//
58250TFunless ($func_header =~ /^(?:([\w:]*)::)?(\w+)\s*\(\s*(.*?)\s*\)\s*(const)?\s*(;\s*)?$/s)
59050TFif $4
59650TFif ($$self{'Is_VMS'})
60350TFunless defined $$tmp{'functions'}{$$self{'Full_func_name'}}
619100TFif ($$self{'argtypes'} and $orig_args =~ /\S/) { }
62150TFif ($args =~ /^( (??{ $C_arg }) , )* $ /x) { }
631100TFunless defined $pre and length $pre
63550TFif ($$self{'inout'} and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//)
6370TFif $type ne 'IN'
642100TFif ($name =~ /^length\( \s* (\w+) \s* \)\z/x)
64550TFif length $default
64850TFif (length $pre or $islength)
649100TFif ($islength) { }
659100TFif $out_type eq 'OUTLIST' or $islength
66150TFif $out_type =~ /OUTLIST$/
66250TFif $out_type
6740TFif ($$self{'inout'} and $thisarg =~ s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//)
6760TFif $out_type eq 'IN'
6770TFif $out_type eq 'OUTLIST'
6810TFif $out_type =~ /OUTLIST$/
68750TFif (defined $class)
6880TFdefined $static || $$self{'func_name'} eq 'new' ? :
697100TFif ($args[$i] =~ s/\.\.\.//)
69950TFif ($args[$i] eq '' and $i == $#args)
705100TFif ($only_C_inlist{$args[$i]}) { }
71250TFif ($args[$i] =~ /^([^=]*[^\s=])\s*=\s*(.*)/s)
72450TFif defined $class
72750TFif $$self{'in_out'}{$fa}
74150TFif $EXPLICIT_RETURN
74350TF$externC ? :
757100TFif $ALIAS
76050TFif $INTERFACE
763100TFif ($ellipsis) { }
50TFelsif ($min_args == $num_args) { }
764100TF$min_args ? :
77350TFif $$self{'except'}
778100TFif ($$self{'cond'}) { }
796100TFif $PPCODE
800100TFif $PPCODE
817100TFif (($kwd, $thisline) = $self->check_keyword($thisline, 'CASE') and $kwd)
102850TFif ($thisline =~ /^(ENABLE|DISABLE)/) { }
1030100TF$status eq 'ENABLE' ? :
104750TFif ($thisline =~ /^(ENABLE|DISABLE)/) { }
104950TF$status eq 'ENABLE' ? :
106350TFunless $Ver
106750TFunless $Ver =~ /^\d+(\.\d*(_\d*)?)?/
107450TFunless $version >= $Ver
109150TFunless exists $map{uc $thisline}
110350TFunless $thisline
110550TFif $thisline =~ /^\s*\|/
110850TFif $$self{'IncludedFiles'}{$thisline}
111050TFunless $thisline =~ /\|\s*$/
112750TFunless open $IN, "$thisline"
1142100TFunless $thisline =~ /^\s*$/
115250TFif ($$self{'condnum'} and $$self{'cond'} eq '')
115850TF$$self{'condnum'}++ ? :
50TF$$self{'cond'} ? :
11680TFif $thisline =~ /^\s*NOT_IMPLEMENTED_YET/
11690TFunless $thisline =~ /\S/
11750TFunless $thisline =~ /[=;+].*\S/
11780TFif ($thisline =~ s/^([^=]*)\blength\(\s*(\w+)\s*\)\s*$/$1 XSauto_length_of_$2=NO_INIT/x)
11880TFif $thisline =~ s/\s*([=;+].*)$//s
11920TFunless ($thisline =~ /^(.*?[^&\s])\s*(\&?)\s*\b(\w+)$/s)
12050TFif ($$self{'arg_list'}{$var_name}++ or defined $$self{'argtype_seen'}{$var_name} and not $$self{'processing_arg_with_types'})
12200TFif ($var_type =~ / \( \s* \* \s* \) /x) { }
12310TFif $$self{'var_num'}
12330TFif $var_addr
12340TFif ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/ or $$self{'in_out'}{$var_name} and $$self{'in_out'}{$var_name} =~ /^OUT/ and not $var_init =~ /\S/) { }
0TFelsif ($var_init =~ /\S/) { }
0TFelsif ($$self{'var_num'}) { }
12390TFif ($$self{'name_printed'}) { }
12650TFunless $$self{'hiertype'}
12670TFif ($varname)
12680TFif ($varname and $type =~ / \( \s* \* (?= \s* \) ) /gx) { }
12800TFunless return $$self{'proto_letter'}{$type}
128650TFif (@cpp)
12890TFif ($cpp =~ /^\#\s*if/) { }
0TFelsif (not $cpplevel) { }
0TFelsif ($cpp =~ /^\#\s*endif/) { }
12940TFif $$self{'XSStack'}[-1]{'type'} eq 'if'
13020TFif $cpplevel
1312100TFunless @_ == 2
1315100TFunless exists $$self{$arg}
1320100TFunless @_ == 3
133250TFif $string =~ /^$$self{'proto_re'}+$/o
138150TFif (not defined $$self{'lastline'} and $$self{'XSStack'}[-1]{'type'} eq 'if')
1398100TFif (not defined $$self{'lastline'}) { }
1399100TFif ($$self{'XSStack'}[-1]{'type'} eq 'file')
140450TFunless $isPipe
142250TFif ($isPipe and $?)
1440100TFif ($$self{'lastline'} =~ /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/)
1443100TFdefined $2 ? :
1444100TFdefined $3 ? :
1449100TFif $$self{'Packprefix'} ne ''
1457100TFif $$self{'lastline'} =~ /^=cut\s*$/
146050TFunless $$self{'lastline'}
1472100TFif (not $$self{'lastline'} =~ /^\s*#/ or $$self{'lastline'} =~ /^#[ \t]*(?:(?:if|ifn?def|elif|else|endif|define|undef|pragma|error|warning|line\s+\d+|ident)\b|(?:include(?:_next)?|import)\s*["<].*[>"])/)
1474100TFif $$self{'lastline'} =~ /^\S/ and @line and $line[-1] eq ''
1480100TFunless defined($$self{'lastline'} = <$IN>)
153050TFif defined $_[0]
1540100TFif -e $file
16330TFunless (defined $$self{'type_kind'}{$type})
16420TFif $$self{'func_name'} =~ /DESTROY$/
16430TFif ($tk eq 'T_PV' and exists $$self{'lengthof'}{$$self{'var'}})
16440TFunless $$self{'name_printed'}
16460TFif defined $$self{'defaults'}{$$self{'var'}}
16500TFunless $$self{'hiertype'}
16530TFunless (defined $$self{'input_expr'}{$tk})
16590TFif ($$self{'expr'} =~ /DO_ARRAY_ELEM/)
16620TFunless (defined $$self{'type_kind'}{$$self{'subtype'}})
16690TFunless (defined $$self{'input_expr'}{$$self{'type_kind'}}{$$self{'subtype'}})
16830TFif ($$self{'expr'} =~ m[/\*.*scope.*\*/]i)
16860TFif (defined $$self{'defaults'}{$$self{'var'}}) { }
0TFelsif ($$self{'ScopeThisXSUB'} or not $$self{'expr'} =~ /^\s*\$self->{var} =/) { }
16890TFif ($$self{'name_printed'}) { }
16940TFif $@
16960TFif ($$self{'defaults'}{$$self{'var'}} eq 'NO_INIT') { }
17020TFif $@
17050TFif ($$self{'name_printed'}) { }
17100TFif $@
17130TFif $@
17160TFif ($$self{'name_printed'})
17200TFif $@
17310TFif ($init =~ /^=/) { }
17320TFif ($$self{'name_printed'}) { }
17380TFif $@
17410TFif ($init =~ s/^\+// and $$self{'var_num'}) { }
0TFelsif ($$self{'name_printed'}) { }
17510TFif $@
17550TFif $@