+ test_build_style($info);
+ return $info->{_tests}->{run_configure}
+ if defined $info->{_tests}->{run_configure};
+
+ $info->{tmp_destdir} = getcwd() . "/pldcpan_destdir_$$";
+ system(qw(rm -rf), $info->{tmp_destdir}) if -e $info->{tmp_destdir};
+ my @cmd;
+ if ($info->{_tests}->{build_style}) {
+ @cmd =
+ $info->{uses_makemaker}
+ ? qw(perl Makefile.PL INSTALLDIRS=vendor)
+ : (
+ qw(perl Build.PL installdirs=vendor config="optimize='%{rpmcflags}'"),
+ qw(destdir='$info->{tmp_destdir}')
+ );
+ }
+ else {
+ @cmd = (
+ qw(perl -MExtUtils::MakeMaker -wle),
+ qq#WriteMakefile(NAME=>"$info->{parts_joined}")#,
+ qw(INSTALLDIRS=>vendor)
+ );
+ }
+ $info->{_tests}->{run_configure} = run \@cmd, \undef, \my $out, \my $err,
+ timeout(20);