BEGIN {
chdir 't';
@INC = '../lib';
- require './test.pl';
+ require './test.pl'; # for which_perl() etc
}
-my $Perl = which_perl;
+my $Perl = which_perl();
print "1..3\n";
open(try,">Comp.script") || (die "Can't open temp file.");
print try 'print "ok\n";'; print try "\n";
-close try;
+close try or die "Could not close: $!";
$x = `$Perl Comp.script`;