Branch Coverage

blib/lib/Module/Build/Convert.pm
Criterion Covered Total %
branch 0 354 0.0


line true false branch
56 0 0 unless $self->{'dirs'}
0 0 unless ($self->{'Config'}{'reinit'} or @{[] unless $self->{'dirs'};})
57 0 0 if ($self->{'Config'}{'Path'}) { }
58 0 0 if (-f $self->{'Config'}{'Path'})
64 0 0 unless opendir my $dh, $self->{'Config'}{'Path'}
66 0 0 if /[\w\-]+[\d\.]+/
68 0 0 unless (@{$self->{'dirs'};})
82 0 0 if $self->{'Config'}{'reinit'}
84 0 0 if @{$self->{'dirs'};} > 1
91 0 0 unless ($self->{'have_single_dir'})
93 0 0 unless $self->{'Config'}{'reinit'}
102 0 0 unless $self->{'have_single_dir'}
107 0 0 unless ($self->{'Config'}{'reinit'})
113 0 0 if @{$self->{'dirs'};}
115 0 0 if $self->{'Config'}{'Create_RC'}
117 0 0 unless ($self->_exists_overwrite and $self->_makefile_ok)
130 0 0 if -e $self->{'Config'}{'MANIFEST'}
133 0 0 if $self->{'show_summary'}
139 0 0 if (-e $self->{'Config'}{'Build_PL'})
141 0 0 if $self->{'show_summary'} and not $self->{'Config'}{'Verbose'}
143 0 0 if $self->{'Config'}{'Verbose'}
146 0 0 if ($self->{'Config'}{'Dont_Overwrite_Auto'}) { }
150 0 0 if (not $input_ok) { }
152 0 0 if $self->{'Config'}{'Verbose'}
156 0 0 if $self->{'Config'}{'Verbose'}
171 0 0 if (-e $rcfile and not -z $rcfile and File::Slurp::read_file($rcfile) =~ /\w+/) { }
175 0 0 unless my $fh = "IO::File"->new($rcfile, ">")
188 0 0 if (-e $self->{'Config'}{'Makefile_PL'}) { }
194 0 0 $self->{'Config'}{'Path'} ? :
200 0 0 if ($makefile =~ /use\s+inc::Module::Install/)
205 0 0 unless ($makefile =~ /WriteMakefile\s*\(/s)
210 0 0 if (not $failed and $makefile =~ /WriteMakefile\(\s*%\w+.*\s*\)/s and not $self->{'Config'}{'Exec_Makefile'})
215 0 0 if ($failed)
218 0 0 if $self->{'Config'}{'Verbose'} and @{$self->{'dirs'};}
221 0 0 if $self->{'Config'}{'Verbose'} and @{$self->{'dirs'};}
245 0 0 if (index($arg, ".") > 0)
251 0 0 @path ? :
260 0 0 if (shift() || 'undef') eq "create_rc"
265 0 0 if (-e $rcfile and not -z $rcfile and File::Slurp::read_file($rcfile) =~ /\w+/) { }
268 0 0 if (not defined $self->{'DATA'}) { }
278 0 0 unless ($create_rc)
284 0 0 unless ($create_rc)
290 0 0 unless $line
292 0 0 if ($line =~ /^#/)
301 0 0 $create_rc ? :
307 0 0 if ($self->{'Config'}{'Exec_Makefile'}) { }
311 0 0 if ($self->{'Config'}{'Parse_PPI'}) { }
324 0 0 $self->{'Config'}{'Exec_Makefile'} ? :
353 0 0 if defined ${$1;}
399 0 0 $_[0] ? :
403 0 0 if $tokens[$c]->significant
404 0 0 if $pos == $iter
412 0 0 $_[0] ? :
415 0 0 if $c >= 1
418 0 0 if $tokens[$c]->significant
419 0 0 if $pos == $iter
430 0 0 $have{'code'} ? :
432 0 0 if ($self->_is_quotelike($token) and not $have{'code'} and not $have{'nested_structure'} and $token{'last'}->(1) ne '=>') { }
0 0 elsif ($token eq '=>' and not $have{'nested_structure'}) { }
440 0 0 if $structure_ended and $token eq ","
443 0 0 if ($token->isa("PPI::Token::Structure") and not $have{'code'})
444 0 0 if ($token =~ /[\[\{]/) { }
0 0 elsif ($token =~ /[\]\}]/) { }
453 0 0 unless $have{'nested_structure'}
457 0 0 if $token{'next'}->() eq "," and not $have{'code'} and not $have{'nested_structure'}
458 0 0 if $token->isa("PPI::Token::Word") and $token{'next'}->(1) ne "=>"
460 0 0 if ($have{'code'})
461 0 0 if $token eq ","
466 0 0 if (&$followed_by_arrow()) { }
0 0 elsif ($token eq ',' and $token{'next'}->(1) eq ']' or $token{'next'}->(1) eq ']') { }
470 0 0 $have{'nested_structure'} ? :
0 0 if ($token{'next'}->(1) =~ /^[\}\]]$/ or not $have{'nested_structure'}) { }
478 0 0 unless ($token =~ /^[\[\]\{\}]$/ and not $have{'code'})
479 0 0 if $token eq "=>"
480 0 0 if $token eq "," and not $have{'code'} and not $seen{'code'}
482 0 0 if (defined $keyword)
484 0 0 unless $token =~ /^['"]\s+['"]$/ or $have{'code'}
486 0 0 if (not $have{'code'} || $structure_ended) { }
489 0 0 if (@items % 2 == 1 and $type ne 'array' or not @items) { }
492 0 0 unless $structure_ended and $type eq "string"
499 0 0 if ($structure_ended and @items)
504 0 0 if $type eq "hash" and defined $items[-1]
526 0 0 $token->isa('PPI::Token::Double') || $token->isa('PPI::Token::Quote::Interpolate') || $token->isa('PPI::Token::Quote::Literal') || $token->isa('PPI::Token::Quote::Single') || $token->isa('PPI::Token::Word') ? :
541 0 0 if $token eq "," and not $have{'?'}
543 0 0 unless ($have{'ternary'})
544 0 0 if $token eq "("
545 0 0 if $token eq ")"
548 0 0 if $token eq "?"
549 0 0 if $token eq ":"
551 0 0 if $have{'?'} and $have{':'}
553 0 0 if ($have{'ternary'})
563 0 0 if $token eq "("
564 0 0 if $token eq ")"
566 0 0 if $occurences{'('} or $occurences{')'}
567 0 0 if $token eq ","
569 0 0 if ($occurences{'('} == $occurences{')'} and $have{'parentheses'} and $have{'comma'})
594 0 0 unless $self->{'parse'}{'makefile'} =~ /\n$/s
597 0 0 if ($self->{'parse'}{'makefile'} =~ s/$found_string//) { }
0 0 elsif ($self->{'parse'}{'makefile'} =~ s/$found_array//s) { }
0 0 elsif ($self->{'parse'}{'makefile'} =~ s/$found_hash//s) { }
618 0 0 if ($self->{'Config'}{'Process_Code'})
626 0 0 unless $self->{'parse'}{'makefile'} =~ /\w/
735 0 0 if ($code[0]) { }
0 0 elsif ($variable[0]) { }
0 0 elsif ($self->{'parse'}{'makefile'} =~ /\#/) { }
755 0 0 unless $self->{'parse'}{'makefile'} =~ /\n$/s
793 0 0 if $self->{'parse'}{'makecode'} eq $self->{'makecode_prev'}
795 0 0 if ($self->{'parse'}{'trapped_loop'}{$self->{'parse'}{'makecode'}} > 1)
811 0 0 if ($self->{'parse'}{'makecode'} =~ /\b$make\b/s)
820 0 0 unless $self->{'parse'}{'histargs'}
0 0 if (@{[] unless $self->{'parse'}{'histargs'};}) { }
837 0 0 if (defined $comment and defined $self->{'Data'}{'table'}{$arg})
896 0 0 if (ref $self->{'parse'}{'makecode'} eq 'ARRAY') { }
902 0 0 if @args > 1
935 0 0 if ($self->{'disabled'}{$arg})
939 0 0 unless ($self->{'Data'}{'table'}{$arg})
943 0 0 if (ref $self->{'make_args'}{'args'}{$arg} eq 'HASH') { }
0 0 elsif (ref $self->{'make_args'}{'args'}{$arg} eq 'ARRAY') { }
0 0 elsif (ref $self->{'make_args'}{'args'}{$arg} eq '') { }
944 0 0 if (ref $self->{'Data'}{'table'}{$arg} eq 'HASH') { }
953 0 0 if (ref $current eq 'HASH') { }
956 0 0 if (substr($current, 0, 1) eq '@') { }
958 0 0 if (ref $value eq 'ARRAY') { }
985 0 0 if @{$self->{'Data'}{'sort_order'};}
997 0 0 if (exists $self->{'make_args'}{'args'}{$build{$arg}})
1002 0 0 if $value eq "HASH"
1003 0 0 if $value eq "ARRAY"
1004 0 0 if $value eq "SCALAR" and not $value =~ /\d+/
1027 0 0 if ($self->{'Config'}{'Use_Native_Order'})
1034 0 0 unless $s % 2 == 0
1037 0 0 if exists $self->{'Data'}{'table'}{$self->{'make_args_arr'}[$s]}
1048 0 0 if ($self->{'Config'}{'Use_Native_Order'}) { }
1053 0 0 if ($native_sortorder{$arg}) { }
1082 0 0 unless (exists $sortorder{$arg})
1087 0 0 if ($i != $sortorder{$arg})
1122 0 0 unless my $fh = "IO::File"->new($self->{'Config'}{'Build_PL'}, ">")
1136 0 0 if not $self->{'have_single_dir'}
1150 0 0 if (defined $self->{'make_code'}{'begin'} or defined $self->{'make_code'}{'end'})
1156 0 0 if ($self->{'make_code'}{'begin'} =~ /(?:prompt|Verbose)\s*\(/s)
1168 0 0 if ($self->{'make_code'}{'begin'} =~ /Module::Build::Compat/)
1178 0 0 if ($self->{'make_code'}{$var} =~ /$has_MM_sub/)
1208 0 0 if ($code_header =~ /(?:use|require)\s+\d\.[\d_]*\s*;/) { }
1225 0 0 $comments_header =~ /\w/ ? :
0 0 $code_header =~ /\w/ ? :
0 0 $comments_header || $code_header ? :
1238 0 0 if ($line =~ /^sub $quoted_pattern\w+/s or $line =~ /^\{/)
1240 0 0 if ($seen{'begin'} and $line =~ /^\s*}/)
1242 0 0 if ($seen{'begin'} or $seen{'end'}) { }
1248 0 0 if ($seen{'end'})
1278 0 0 unless $self->{'make_code'}{'args'}{'begin'}
0 0 if (@{[] unless $self->{'make_code'}{'args'}{'begin'};})
1280 0 0 if (ref $codechunk eq 'ARRAY') { }
1294 0 0 if ($chunk =~ /=> [\{\[]/) { }
1297 0 0 $regex ? :
1316 0 0 if $line =~ /^\s+/
1319 0 0 if $line =~ /[\d+ \} \]] $/x
1323 0 0 if $line =~ /\(/
1326 0 0 if $line =~ /['"](?!,)$/ and $#lines - $i != 1
1333 0 0 $i == $#lines && defined $self->{'make_comments'}{$arg} ? :
1349 0 0 if $chunk =~ /\(/
1356 0 0 if defined $self->{'make_comments'}{$arg}
1366 0 0 if ($self->{'make_code'}{'args'}{$arg})
1369 0 0 if (ref $arg eq 'ARRAY') { }
1377 0 0 unless $arg
1379 0 0 unless $arg =~ /^\#/
1397 0 0 if ($$string =~ /\$\(/)
1421 0 0 $self->{'make_code'}{$section} =~ /\w/ ? :
1427 0 0 unless my $fh = "IO::File"->new($self->{'Config'}{'MANIFEST'}, "<")
1434 0 0 unless (grep {/^$build_pl\s+$/o;} @manifest)
1437 0 0 unless $fh = "IO::File"->new($self->{'Config'}{'MANIFEST'}, ">")
1460 0 0 unless $self->{'summary'}{$item->[1]}
0 0 unless @{[] unless $self->{'summary'}{$item->[1]};}
1475 0 0 $_[-1] =~ /^\d$/ ? :
1477 0 0 if ($self->{'Config'}{'Verbose'} and $level == 1 or $self->{'Config'}{'Verbose'} == 2 and $level == 2)
1486 0 0 if ($self->{'Config'}{'Debug'})
1487 0 0 if $_[-1] eq "no_wait"
1489 0 0 unless $no_wait