ExtUtils-MakeMaker
view release on metacpan or search on metacpan
No changes since v7.77_03
7.77_03 Mon 2 Mar 17:32:54 GMT 2026
Macosx fixes:
- Unbreak Perl builds
7.77_02 Wed 20 Aug 11:00:32 BST 2025
Core fixes:
- Do not copy args when using PERL_MM_SHEBANG=relocatable
7.77_01 Mon 28 Jul 18:46:15 BST 2025
Enhancements:
- Support 'class' VERSIONs, like 'package'
Core fixes:
- Disable XS prototypes by default
Test fixes:
- Avoid mangling /bin non-perl shebangs on merged-/usr systems
VMS fixes:
- Handle PERL_ARCHLIBDEP and DESTINSTALL... macros on VMS.
- Remove trailing space from multi-in.PL in PL_FILES.t
- Skip "merged /usr" tests on VMS.
7.35_06 Thu Jul 19 20:30:55 BST 2018
Enhancements:
- Override shebang with PERL_MM_SHEBANG=relocatable env var
Bug fixes:
- Refactored Liblist::Kid tests, enabling UNIX testing
7.35_05 Tue Jul 10 09:44:25 BST 2018
Win32 fixes:
- add Visual C parallel building support
7.35_04 Mon Jul 9 10:21:59 BST 2018
New Features
* The new "package NAME VERSION" syntax from 5.11 is now supported by
parse_version() and thus VERSION_FROM. The first version declaration,
package or $VERSION, is used. (David Golden)
6.55_02 Wed Aug 5 00:36:36 PDT 2009
Feature Changes
* PREFIX now applies to relative directories. This is a change since
6.20 when they were ignored. Its necessary for relocatable Perls.
VMS
* Refactoring of "MakeMaker Parameters" section in 6.55_01 broke VMS.
(Craig Berry)
6.55_01 Tue Jul 14 15:53:30 PDT 2009
Test Fixes
* The tests got a bit overzealous and removed the LIB environment variable
while is necessary for some compilers to work. [rt.cpan.org 47722]
bundled/ExtUtils-Install/ExtUtils/Packlist.pm view on Meta::CPAN
sub mkfh()
{
no strict;
local $^W;
my $fh = \*{$fhname++};
use strict;
return($fh);
}
=item __find_relocations
Works out what absolute paths in the configuration have been located at run
time relative to $^X, and generates a regexp that matches them
=back
=end _undocumented
=cut
sub __find_relocations
{
my %paths;
while (my ($raw_key, $raw_val) = each %Config) {
my $exp_key = $raw_key . "exp";
next unless exists $Config{$exp_key};
next unless $raw_val =~ m!\.\.\./!;
$paths{$Config{$exp_key}}++;
}
# Longest prefixes go first in the alternatives
my $alternations = join "|", map {quotemeta $_}
bundled/ExtUtils-Install/ExtUtils/Packlist.pm view on Meta::CPAN
my ($line);
while (defined($line = <$fh>))
{
chomp $line;
my ($key, $data) = $line;
if ($key =~ /^(.*?)( \w+=.*)$/)
{
$key = $1;
$data = { map { split('=', $_) } split(' ', $2)};
if ($Config{userelocatableinc} && $data->{relocate_as})
{
require File::Spec;
require Cwd;
my ($vol, $dir) = File::Spec->splitpath($packfile);
my $newpath = File::Spec->catpath($vol, $dir, $data->{relocate_as});
$key = Cwd::realpath($newpath);
}
}
$key =~ s!/\./!/!g; # Some .packlists have spurious '/./' bits in the paths
$self->{data}->{$key} = $data;
}
close($fh);
}
sub write($;$)
bundled/ExtUtils-Install/ExtUtils/Packlist.pm view on Meta::CPAN
my ($self, $packfile) = @_;
$self = tied(%$self) || $self;
if (defined($packfile)) { $self->{packfile} = $packfile; }
else { $packfile = $self->{packfile}; }
Carp::croak("No packlist filename specified") if (! defined($packfile));
my $fh = mkfh();
open($fh, ">$packfile") || Carp::croak("Can't open file $packfile: $!");
foreach my $key (sort(keys(%{$self->{data}})))
{
my $data = $self->{data}->{$key};
if ($Config{userelocatableinc}) {
$Relocations ||= __find_relocations();
if ($packfile =~ $Relocations) {
# We are writing into a subdirectory of a run-time relocated
# path. Figure out if the this file is also within a subdir.
my $prefix = $1;
if (File::Spec->no_upwards(File::Spec->abs2rel($key, $prefix)))
{
# The relocated path is within the found prefix
my $packfile_prefix;
(undef, $packfile_prefix)
= File::Spec->splitpath($packfile);
my $relocate_as
= File::Spec->abs2rel($key, $packfile_prefix);
if (!ref $data) {
$data = {};
}
$data->{relocate_as} = $relocate_as;
}
}
}
print $fh ("$key");
if (ref($data))
{
foreach my $k (sort(keys(%$data)))
{
print $fh (" $k=$data->{$k}");
}
lib/ExtUtils/MM_Unix.pm view on Meta::CPAN
sub _fixin_replace_shebang {
my ( $self, $file, $line ) = @_;
# Now figure out the interpreter name.
my ( $origcmd, $arg ) = split ' ', $line, 2;
(my $cmd = $origcmd) =~ s!^.*/!!;
# Now look (in reverse) for interpreter in absolute PATH (unless perl).
my $interpreter;
if ( defined $ENV{PERL_MM_SHEBANG} && $ENV{PERL_MM_SHEBANG} eq "relocatable" ) {
$interpreter = "/usr/bin/env perl";
$arg = '';
}
elsif ( $cmd =~ m{^perl(?:\z|[^a-z])} ) {
if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
$interpreter = $Config{startperl};
$interpreter =~ s,^\#!,,;
}
else {
$interpreter = $Config{perlpath};
lib/ExtUtils/MM_Unix.pm view on Meta::CPAN
}
}
}
if ($Is{Android}) {
# Android fun times!
# ../../perl -I../../lib -MFile::Glob -e1 works
# ../../../perl -I../../../lib -MFile::Glob -e1 fails to find
# the .so for File::Glob.
# This always affects core perl, but may also affect an installed
# perl built with -Duserelocatableinc.
$self->{PERL_LIB} = File::Spec->rel2abs($self->{PERL_LIB});
$self->{PERL_ARCHLIB} = File::Spec->rel2abs($self->{PERL_ARCHLIB});
}
$self->{PERL_INCDEP} = $self->{PERL_INC};
$self->{PERL_ARCHLIBDEP} = $self->{PERL_ARCHLIB};
# We get SITELIBEXP and SITEARCHEXP directly via
# Get_from_Config. When we are running standard modules, these
# won't matter, we will set INSTALLDIRS to "perl". Otherwise we
# set it to "site". I prefer that INSTALLDIRS be set from outside
#!/foo/bar/perly -w
blah blah blah
END
}
);
}
SKIP: {
skip "Not relevant on VMS or MSWin32", 3 if $^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'cygwin';
local $ENV{PERL_MM_SHEBANG}='relocatable';
test_fixin(<<END,
#!/usr/bin/env perl
foo doo who doo
END
sub {
my @lines = @_;
like $lines[0], qr[^#!/usr/bin/env perl\s$], "Relocatable perl";
}
);
( run in 0.920 second using v1.01-cache-2.11-cpan-71847e10f99 )