Branch Coverage

blib/lib/ExtUtils/XSOne.pm
Criterion Covered Total %
branch 70 82 85.3


line true false branch
18 1 36 unless my $src_dir = $opts{'src_dir'}
19 1 35 unless my $output = $opts{'output'}
22 1 34 exists $opts{'deduplicate'} ? :
26 1 34 if ($recursive) { }
33 2 30 if ($verbose)
51 7 93 $recursive ? :
52 8 92 if $verbose
58 98 2 if ($dedup) { }
65 17 0 if ($is_header and $preamble eq "" and $xs_part =~ /\S/)
76 88 26 unless ($seen_includes{$normalized}++)
84 25 6 unless ($seen_defines{$name}++)
91 57 41 if ($other_c =~ /\S/)
92 17 40 if ($is_header) { }
100 81 17 if $xs_part =~ /\S/
113 5 5 if ($dedup and @collected_includes || @collected_defines || @collected_c_code)
118 21 5 if (@collected_includes)
123 17 9 if (@collected_defines)
145 2 30 if $verbose
165 2 38 unless -d $src_dir
167 0 38 unless opendir my $dh, $src_dir
171 1 37 unless @xs_files
179 0 2 unless -d $src_dir
191 6 14 unless -f $_ and /\.xs$/
205 4 10 if ($filename eq '_header.xs') { }
4 6 elsif ($filename eq '_footer.xs') { }
216 0 0 unless @headers or @footers or @packages
220 0 2 unless $ExtUtils::XSOne::a->{'depth'} <=> $ExtUtils::XSOne::b->{'depth'}
225 0 2 unless $ExtUtils::XSOne::b->{'depth'} <=> $ExtUtils::XSOne::a->{'depth'}
237 5 32 if ($order and @$order)
244 19 0 if ($available{$file})
259 32 64 if /^_/
268 71 27 if ($content =~ /^(.*?)(^MODULE\s*=\s*.+)$/ms)
284 114 941 if ($line =~ /^\s*#\s*include\s/) { }
31 910 elsif ($line =~ /^\s*#\s*define\s/) { }
306 114 0 if ($include =~ /#\s*include\s*[<"]([^>"]+)[>"]/)
315 31 0 if ($define =~ /#\s*define\s+(\w+)/)
347 73 10 if ($content =~ /^\s*MODULE\s*=/m) { }
367 0 100 unless open my $fh, "<", $path
380 1 31 if ($dir and $dir ne "." and not -d $dir)
384 2 30 if $verbose
386 0 32 unless open my $fh, ">", $path