$perl ||= $candidate if MM->maybe_command($candidate);
unless ($perl) {
my ($component,$perl_name);
- DIST_PERLNAME: foreach $perl_name ($^X, 'perl', 'perl5', "perl$]") {
+ DIST_PERLNAME:
+ foreach $perl_name ($^X, 'perl', 'perl5', "perl$Config::Config{version}") {
PATH_COMPONENT: foreach $component (MM->path(),
$Config::Config{'binexp'}) {
next unless defined($component) && $component;
# Read the core packlist
$self->{Perl}{packlist} =
ExtUtils::Packlist->new("$Config{installarchlib}/.packlist");
-$self->{Perl}{version} = $];
+$self->{Perl}{version} = $Config{version};
# Read the module packlists
my $sub = sub
push @defpath, $component if defined $component;
}
$self->{PERL} ||=
- $self->find_perl(5.0, [ $self->canonpath($^X), 'miniperl','perl','perl5',"perl$]" ],
+ $self->find_perl(5.0, [ $self->canonpath($^X), 'miniperl',
+ 'perl','perl5',"perl$Config{version}" ],
\@defpath, $Verbose );
# don't check if perl is executable, maybe they have decided to
# supply switches with perl
}
my $distname = $data->{DISTNAME} || $data->{NAME};
$distname = "Distribution $distname";
- my $comment = "Perl (v$]$threaded) module $data->{NAME}";
+ my $comment = "Perl (v$Config::Config{version}$threaded) module $data->{NAME}";
if ($data->{INSTALLDIRS} and $data->{INSTALLDIRS} eq 'perl') {
$distname = 'perl5-porters@perl.org';
$comment = "Core $comment";
# but we shouldn't need that any more. Get the version from the running
# Perl.
if (!defined $$self{release}) {
- my ($version, $patch) = ($] =~ /^(.{5})(\d{2})?/);
- $$self{release} = "perl $version";
- $$self{release} .= ", patch $patch" if $patch;
+ my ($rev, $ver, $sver) = ($] =~ /^(\d+)\.(\d{3})(\d{0,3})$/);
+ $sver ||= 0; $sver *= 10 ** (3-length($sver));
+ $rev += 0; $ver += 0; $sver += 0;
+ $$self{release} = "perl v$rev.$ver.$sver";
}
# Double quotes in things that will be quoted.
}
@trypod = (
"$archlib/pod/perldiag.pod",
- "$privlib/pod/perldiag-$].pod",
+ "$privlib/pod/perldiag-$Config{version}.pod",
"$privlib/pod/perldiag.pod",
"$archlib/pods/perldiag.pod",
- "$privlib/pods/perldiag-$].pod",
+ "$privlib/pods/perldiag-$Config{version}.pod",
"$privlib/pods/perldiag.pod",
);
# handy for development testing of new warnings etc
use Config;
my $archname = $Config{'archname'};
+my $ver = $Config{'version'};
@ORIG_INC = @INC; # take a handy copy of 'original' value
# looks like $_ has an archlib directory below it.
if (-d "$_/$archname") {
unshift(@INC, "$_/$archname") if -d "$_/$archname/auto";
- unshift(@INC, "$_/$archname/$]") if -d "$_/$archname/$]/auto";
+ unshift(@INC, "$_/$archname/$ver") if -d "$_/$archname/$ver/auto";
}
}