Skip to content

Commit

Permalink
more portable version of executing perl from perl ;)
Browse files Browse the repository at this point in the history
git-svn-id: https://cle.sk/repos/pub/cpan/Run-Env/trunk@282 b0c1b02c-7ba7-4df7-b273-855bf36df2ab
  • Loading branch information
jk committed Mar 13, 2008
1 parent 26e7adf commit 9b30017
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions META.yml
@@ -1,6 +1,6 @@
---
name: Run-Env
version: 0.01_02
version: 0.01_03
author:
- 'Jozef Kutej <jozef@kutej.net>'
abstract: running environment detection
Expand All @@ -14,5 +14,5 @@ build_requires:
provides:
Run::Env:
file: lib/Run/Env.pm
version: 0.01_02
version: 0.01_03
generated_by: Module::Build version 0.26
10 changes: 9 additions & 1 deletion t/02_Running-Environment.t
Expand Up @@ -8,6 +8,7 @@ use Test::More tests => 27;

use English '-no_match_vars';
use FindBin;
use Config;

exit main();

Expand Down Expand Up @@ -52,7 +53,14 @@ sub main {
Run::Env::set_debug();
diag 'run bin/print-run-env.pl to get Run::Env';

my $print_run_env = $^X.' '.File::Spec->catfile($FindBin::Bin, 'bin', 'print-run-env.pl');
# copy&paste from perlvar
my $this_perl = $^X;
if ($^O ne 'VMS') {
$this_perl .= $Config{_exe}
unless $this_perl =~ m/$Config{_exe}$/i;
}

my $print_run_env = $this_perl.' '.File::Spec->catfile($FindBin::Bin, 'bin', 'print-run-env.pl');
my $output = eval { `$print_run_env` };

SKIP: {
Expand Down

0 comments on commit 9b30017

Please sign in to comment.