@@ -183,10 +183,11 @@ $mtext =~ s/^(\s*PERL\s*=.*)$/$1 -Iinc/m;
183183write_file($makefile , $mtext );
184184
185185sub check_dummy_inst {
186- my ($loc , $install_args , $ label , $skipsubdir ) = @_ ;
186+ my ($loc , $label , $skipsubdir ) = ( shift , shift , shift ) ;
187187 my %files ;
188188 SKIP: {
189- my $install_out = run(" $make install NOECHO= $install_args " );
189+ my $run_cmd = make_macro($make , ' install' , ' NOECHO' => ' ' , @_ );
190+ my $install_out = run($run_cmd );
190191 is( $? , 0, " install $label " ) || diag $install_out ;
191192 like( $install_out , qr / ^Installing / m , " /Installing/ $label " );
192193 ok( -r $loc , " $label install dir created" )
@@ -209,17 +210,17 @@ sub check_dummy_inst {
209210 \%files ;
210211}
211212
212- check_dummy_inst($DUMMYINST , ' ' , ' Module::Install style' );
213+ check_dummy_inst($DUMMYINST , ' Module::Install style' );
213214
214215SKIP: {
215216 skip ' VMS install targets do not preserve $(PREFIX)' , 8 if $Is_VMS ;
216- check_dummy_inst(' elsewhere' , " PREFIX=elsewhere " , ' with PREFIX' );
217+ check_dummy_inst(' elsewhere' , ' with PREFIX' , 0, ' PREFIX' => ' elsewhere ' );
217218 rmtree(' elsewhere' );
218219}
219220
220221SKIP: {
221222 skip ' VMS install targets do not preserve $(DESTDIR)' , 10 if $Is_VMS ;
222- my $files = check_dummy_inst(' other' , ' PREFIX= DESTDIR=other ' , ' with DESTDIR' );
223+ my $files = check_dummy_inst(' other' , ' with DESTDIR' , 0, ' PREFIX ' => ' ' , ' DESTDIR' => ' other ' );
223224 eval {
224225 unlike slurp($files -> {' perllocal.pod' }), qr / other/ , ' DESTDIR should not appear in perllocal' ; 1
225226 } or fail " error in slurp: $@ " ;
@@ -239,7 +240,7 @@ SKIP: {
239240
240241SKIP: {
241242 skip ' VMS install targets do not preserve $(PREFIX)' , 9 if $Is_VMS ;
242- check_dummy_inst(' other/elsewhere' , ' PREFIX=elsewhere DESTDIR=other/ ' , ' PREFIX override and DESTDIR' );
243+ check_dummy_inst(' other/elsewhere' , ' PREFIX override and DESTDIR' , 0, ' PREFIX' => ' elsewhere ' , ' DESTDIR' => ' other/ ' );
243244 ok( !-d ' elsewhere' , ' install dir not created' );
244245 rmtree(' other' );
245246}
@@ -460,13 +461,13 @@ write_file($file, $text);
460461# now do with "Liar" subdir still there
461462rmtree $DUMMYINST ; # so no false positive from before
462463@mpl_out = run(qq{ $perl Makefile.PL "PREFIX=$DUMMYINST "} );
463- check_dummy_inst($DUMMYINST , ' ' , " with PREFIX=$DUMMYINST " );
464+ check_dummy_inst($DUMMYINST , " with PREFIX=$DUMMYINST " );
464465# now clean, delete "Liar" subdir, do again
465466$realclean_out = run(" $make realclean" );
466467rmtree ' Liar' ;
467468rmtree $DUMMYINST ; # so no false positive from before
468469@mpl_out = run(qq{ $perl Makefile.PL "PREFIX=$DUMMYINST "} );
469- check_dummy_inst($DUMMYINST , ' ' , " with PREFIX=$DUMMYINST minus subdir" , 1);
470+ check_dummy_inst($DUMMYINST , " with PREFIX=$DUMMYINST minus subdir" , 1);
470471write_file($file , $preserve_MPL ); # restore Makefile.PL
471472$realclean_out = run(" $make realclean" );
472473rmtree ' Liar' ;
@@ -477,7 +478,8 @@ $text = $preserve_MPL;
477478ok(($text =~ s :\) ;: PM_FILTER => '\$ (ABSPERLRUN) -ne "print unless /^#/"',\n $& : ), ' successful M.PL edit' );
478479write_file($file , $text );
479480@mpl_out = run(qq{ $perl Makefile.PL} );
480- $test_out = run(" $make test NOECHO=" );
481+ my $run_cmd = make_macro($make , ' test' , ' NOECHO' => ' ' );
482+ $test_out = run($run_cmd );
481483like( $test_out , qr / All tests successful/ , ' make test' );
482484is( $? , 0, ' exited normally' ) ||
483485 diag $test_out ;
0 commit comments