From: Vincent Pit Date: Tue, 24 Mar 2015 02:19:10 +0000 (-0300) Subject: Make run_perl() return undef if $Config{perlpath} is not suitable X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=8bb4fde8189dc8eb9682a1954e5152e53822a476;p=perl%2Fmodules%2FVPIT-TestHelpers.git Make run_perl() return undef if $Config{perlpath} is not suitable This may happen if the perl binary has been relocated. --- diff --git a/lib/VPIT/TestHelpers.pm b/lib/VPIT/TestHelpers.pm index 475a86a..940d7f4 100644 --- a/lib/VPIT/TestHelpers.pm +++ b/lib/VPIT/TestHelpers.pm @@ -156,6 +156,9 @@ sub run_perl { my $perl = $^X; unless (-e $perl and -x $perl) { $perl = $Config::Config{perlpath}; + unless (-e $perl and -x $perl) { + return undef; + } } system { $perl } $perl, '-T', map("-I$_", @INC), '-e', $code;