# This kid package is to be used by MakeMaker. It will not work if
# $self is not a Makemaker.
-use 5.00503;
+use 5.006;
# Broken out of MakeMaker from version 4.11
use strict;
-use vars qw($VERSION);
-$VERSION = 1.32_02;
+our $VERSION = 6.48;
use Config;
use Cwd 'cwd';
my(@libpath) = split " ", $Config{'libpth'};
my(@ldloadlibs, @bsloadlibs, @extralibs, @ld_run_path, %ld_run_path_seen);
my(@libs, %libs_seen);
- my($fullname, $thislib, $thispth, @fullname);
+ my($fullname, @fullname);
my($pwd) = cwd(); # from Cwd.pm
my($found) = 0;
- foreach $thislib (split ' ', $potential_libs){
+ foreach my $thislib (split ' ', $potential_libs) {
# Handle possible linker path arguments.
if ($thislib =~ s/^(-[LR]|-Wl,-R)//){ # save path flag type
}
my($found_lib)=0;
- foreach $thispth (@searchpath, @libpath){
+ foreach my $thispth (@searchpath, @libpath) {
# Try to find the full name of the library. We need this to
# determine whether it's a dynamically-loadable library or not.
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
&& (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
} elsif (-f ($fullname="$thispth/lib${thislib}_s$Config_libext")
- && (! $Config{'archname'} =~ /RM\d\d\d-svr4/)
+ && ($Config{'archname'} !~ /RM\d\d\d-svr4/)
&& ($thislib .= "_s") ){ # we must explicitly use _s version
} elsif (-f ($fullname="$thispth/lib$thislib$Config_libext")){
} elsif (-f ($fullname="$thispth/$thislib$Config_libext")){
my $lib = '';
my $found = 0;
my $search = 1;
- my($fullname, $thislib, $thispth);
+ my($fullname);
# add "$Config{installarchlib}/CORE" to default search path
push @libpath, "$Config{installarchlib}/CORE";
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
- $thislib = $_;
+ my $thislib = $_;
# see if entry is a flag
if (/^:\w+$/) {
}
my $found_lib = 0;
- foreach $thispth (@searchpath, @libpath){
+ foreach my $thispth (@searchpath, @libpath){
unless (-f ($fullname="$thispth\\$_")) {
warn "'$thislib' not found as '$fullname'\n" if $verbose;
next;
sub _vms_ext {
- my($self, $potential_libs,$verbose,$give_libs) = @_;
+ my($self, $potential_libs, $verbose, $give_libs) = @_;
$verbose ||= 0;
my(@crtls,$crtlstr);
- my($dbgqual) = $self->{'ldflags'} . $Config{'ldflags'};
- @crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
+ @crtls = ( ($Config{'ldflags'} =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# to insure that the copy in the local tree is used, rather than one to
# which a system-wide logical may point.
if ($self->{PERL_SRC}) {
- my($lib,$locspec,$type);
- foreach $lib (@crtls) {
- if (($locspec,$type) = $lib =~ m!^([\w$\-]+)(/\w+)?! and $locspec =~ /perl/i) {
+ my($locspec,$type);
+ foreach my $lib (@crtls) {
+ if (($locspec,$type) = $lib =~ m{^([\w\$-]+)(/\w+)?} and $locspec =~ /perl/i) {
if (lc $type eq '/share') { $locspec .= $Config{'exe_ext'}; }
elsif (lc $type eq '/library') { $locspec .= $Config{'lib_ext'}; }
else { $locspec .= $Config{'obj_ext'}; }
return ('', '', $crtlstr, '', ($give_libs ? [] : ()));
}
- my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
+ my(%found,@fndlibs,$ldlib);
my $cwd = cwd();
my($so,$lib_ext,$obj_ext) = @Config{'so','lib_ext','obj_ext'};
# List of common Unix library names and their VMS equivalents
warn "Potential libraries are '$potential_libs'\n" if $verbose;
# First, sort out directories and library names in the input
- foreach $lib (split ' ',$potential_libs) {
+ my(@dirs, @libs);
+ foreach my $lib (split ' ',$potential_libs) {
push(@dirs,$1), next if $lib =~ /^-L(.*)/;
push(@dirs,$lib), next if $lib =~ /[:>\]]$/;
push(@dirs,$lib), next if -d $lib;
# Now make sure we've got VMS-syntax absolute directory specs
# (We don't, however, check whether someone's hidden a relative
# path in a logical name.)
- foreach $dir (@dirs) {
+ foreach my $dir (@dirs) {
unless (-d $dir) {
warn "Skipping nonexistent Directory $dir\n" if $verbose > 1;
$dir = '';
@dirs = grep { length($_) } @dirs;
unshift(@dirs,''); # Check each $lib without additions first
- LIB: foreach $lib (@libs) {
+ LIB: foreach my $lib (@libs) {
if (exists $libmap{$lib}) {
next unless length $libmap{$lib};
$lib = $libmap{$lib};
}
- my(@variants,$variant,$cand);
+ my(@variants,$cand);
my($ctype) = '';
# If we don't have a file type, consider it a possibly abbreviated name and
}
push(@variants,$lib);
warn "Looking for $lib\n" if $verbose;
- foreach $variant (@variants) {
+ foreach my $variant (@variants) {
my($fullname, $name);
- foreach $dir (@dirs) {
+ foreach my $dir (@dirs) {
my($type);
$name = "$dir$variant";
push @fndlibs, @{$found{OBJ}} if exists $found{OBJ};
push @fndlibs, map { "$_/Library" } @{$found{OLB}} if exists $found{OLB};
push @fndlibs, map { "$_/Share" } @{$found{SHR}} if exists $found{SHR};
- $lib = join(' ',@fndlibs);
+ my $lib = join(' ',@fndlibs);
$ldlib = $crtlstr ? "$lib $crtlstr" : $lib;
warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose;