Browse files

use Module::Build's concept of the current interpreter rather that $^X

  • Loading branch information...
1 parent d3f4105 commit 7ad95c72a77cbfac211c21c1ffdae2bac5b0e1c5 @jberger jberger committed May 2, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/Alien/Base/ModuleBuild.pm
  2. +2 −1 t/interpolate.t
View
3 lib/Alien/Base/ModuleBuild.pm
@@ -385,7 +385,8 @@ sub alien_interpolate {
# library name (ph: %n)
$string =~ s/(?<!\%)\%n/$name/g;
# current interpreter ($^X) (ph: %x)
- $string =~ s/(?<!\%)\%x/$^X/g;
+ my $perl = $self->perl;
+ $string =~ s/(?<!\%)\%x/$perl/g;
#remove escapes (%%)
$string =~ s/\%(?=\%)//g;
View
3 t/interpolate.t
@@ -18,7 +18,8 @@ my $path = rel2abs "_install";
is( $builder->alien_interpolate('thing other=%s'), "thing other=$path", 'share_dir interpolation');
is( $builder->alien_interpolate('thing other=%%s'), 'thing other=%s', 'no share_dir interpolation with escape');
-is( $builder->alien_interpolate('%x'), "$^X", '%x is current interpreter' );
+my $perl = $builder->perl;
+is( $builder->alien_interpolate('%x'), $perl, '%x is current interpreter' );
done_testing;

0 comments on commit 7ad95c7

Please sign in to comment.