Permalink
Browse files

get correct perl version with basename when "do_install_archive"

  • Loading branch information...
1 parent 3794174 commit 1fea4de152086a8e5fe25a2f80de0061951c7a54 @alecchen alecchen committed May 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/App/perlbrew.pm
View
@@ -5,6 +5,7 @@ use 5.008;
use Capture::Tiny;
use Getopt::Long ();
use File::Spec::Functions qw( catfile catdir );
+use File::Basename;
use File::Path::Tiny;
use FindBin;
use CPAN::Perl::Releases;
@@ -1059,7 +1060,7 @@ sub do_install_archive {
my $dist_version;
my $installation_name;
- if ($dist_tarball_path =~ m{perl-?(5.+)\.tar\.(gz|bz2)\Z}) {
+ if (basename($dist_tarball_path) =~ m{perl-?(5.+)\.tar\.(gz|bz2)\Z}) {
$dist_version = $1;
$installation_name = "perl-${dist_version}";
}

0 comments on commit 1fea4de

Please sign in to comment.