'ExtUtils::MakeMaker' => {
'MAINTAINER' => 'mschwern',
- 'DISTRIBUTION' => 'BINGOS/ExtUtils-MakeMaker-6.68.tar.gz',
+ 'DISTRIBUTION' => 'BINGOS/ExtUtils-MakeMaker-6.70.tar.gz',
'FILES' => q[cpan/ExtUtils-MakeMaker],
'EXCLUDED' => [
qr{^t/lib/Test/},
+6.70 Tue Jul 23 21:55:23 BST 2013
+ No changes from 6.69_09
+
+6.69_09 Sun Jul 21 09:22:40 BST 2013
+ Bug Fixes:
+ * RT#86976 Fix version parsing bug introduced in 6.69_05
+ Part Deux :)
+
+6.69_08 Wed Jul 17 00:36:28 BST 2013
+ Bug Fixes:
+ * RT#86976 Fix version parsing bug introduced in 6.69_05
+
+6.69_07 Tue Jul 16 15:32:25 BST 2013
+ New features:
+ * RT#4550 report the file created after make dist
+
+ Bug Fixes:
+ * RT#66113 strip control characters from ABSTRACT
+ * RT#20662 Don't check for config.h if it doesn't exist
+
+6.69_06 Fri Jul 12 14:49:32 BST 2013
+ Bug Fixes:
+ * RT#64163 clean_subdirs infinite loop if subdir already gone
+ * RT#79348 doesn't support miniperl in installation paths
+
+ Doc Fixes:
+ * Fix META_MERGE example
+ * RT#31053 Mention configure_requires in PREREQ_FATAL documentation
+ * RT#14680 Document TEST_FILES usage with 'make test'
+ * RT#21285 Document 'make veryclean'
+
+6.69_05 Thu Jul 11 22:10:10 BST 2013
+ Bug Fixes:
+ * Resolve RT#9452 regression with
+ parse_version() (Victor Efimov)
+ * RT#28632 use LD and OPTIMIZE in recursive Makefile.PL
+ invocations (Niko Tyni)
+
+6.69_04 Wed Jul 10 11:48:22 BST 2013
+ Cygwin Fixes:
+ * Revert RT#54703 and apply patch from RT#69401 to
+ resolve /cygdrive issues (Reini Urban)
+
+6.69_03 Tue Jul 9 22:39:54 BST 2013
+ Bug Fixes:
+ * RT#61419 Avoid invisible interactive question when
+ rebuilding Makefile (Slaven Rezic)
+ * VERSION also now really handles v-strings correctly.
+
+ Cygwin Fixes:
+ * RT#54703 - Don't hardcode /cygdrive (Jerry Hedden)
+
+ Misc:
+ * Install into site when 5.12 or above
+
+6.69_02 Tue Jul 2 13:12:51 BST 2013
+ Bug Fixes:
+ * [RT#86609] VERSION_FROM now handles v-strings correctly.
+ * VERSION also now handles v-strings correctly.
+
+ Misc:
+ * Updated bundled CPAN::Meta and removed Version::Requirements
+
+6.69_01 Thu Jun 20 12:49:45 BST 2013
+ Win32 Fixes:
+ * resolve regression on Win32 introduced in 6.67_01
+ (bingos)
+
6.68 Fri Jun 14 23:26:11 BST 2013
No changes from 6.67_05
bundled/CPAN-Meta/CPAN/Meta/Feature.pm
bundled/CPAN-Meta/CPAN/Meta/History.pm
bundled/CPAN-Meta/CPAN/Meta/Prereqs.pm
+bundled/CPAN-Meta/CPAN/Meta/Requirements.pm
bundled/CPAN-Meta/CPAN/Meta/Spec.pm
bundled/CPAN-Meta/CPAN/Meta/Validator.pm
bundled/ExtUtils-Command/ExtUtils/Command.pm
bundled/Scalar-List-Utils/List/Util/PP.pm
bundled/Scalar-List-Utils/Scalar/Util.pm
bundled/Scalar-List-Utils/Scalar/Util/PP.pm
-bundled/Version-Requirements/Version/Requirements.pm
bundled/version/version.pm
bundled/version/version.pod
bundled/version/version/Internals.pod
print("$class files in $module are:\n ",
join("\n ", @files), "\n");
}
- else {
- print($@);
+ else {
+ print($@);
}
};
print("$class directories in $module are:\n ",
join("\n ", @dirs), "\n");
}
- else {
- print($@);
+ else {
+ print($@);
}
}
require Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
+our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
warn_if_old_packlist);
-our $VERSION = '6.68';
+our $VERSION = '6.70';
my $Is_VMS = $^O eq 'VMS';
# our arguments into @ARGV. Should be safe.
my %options = ();
Getopt::Long::config ('bundling_override');
- Getopt::Long::GetOptions (\%options,
+ Getopt::Long::GetOptions (\%options,
'section|s=s', 'release|r=s', 'center|c=s',
'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s',
'fixedbolditalic=s', 'official|o', 'quotes|q=s', 'lax|l',
=item B<perllocal_install>
- perl "-MExtUtils::Command::MM" -e perllocal_install
+ perl "-MExtUtils::Command::MM" -e perllocal_install
<type> <module name> <key> <value> ...
# VMS only, key|value pairs come on STDIN
installed into which directory your module was out into
LINKTYPE dynamic or static linking
VERSION module version number
- EXE_FILES any executables installed in a space seperated
+ EXE_FILES any executables installed in a space seperated
list
=cut
my $pod;
$pod = sprintf <<POD, scalar localtime;
=head2 %s: C<$type> L<$name|$name>
-
+
=over 4
-
+
POD
do {
$pod .= <<POD
=item *
-
+
C<$key: $val>
-
+
POD
} while(@mod_info);
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
use File::Spec;
require ExtUtils::Liblist::Kid;
use strict;
use warnings;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
use ExtUtils::MakeMaker::Config;
use Cwd 'cwd';
}
elsif ( -f ( $fullname = "$thispth/lib$thislib.dll$Config_libext" ) ) {
}
- elsif ( -f ( $fullname = "$thispth/$thislib.dll" ) ) {
+ elsif ( $^O eq 'cygwin' && -f ( $fullname = "$thispth/$thislib.dll" ) ) {
}
elsif ( -f ( $fullname = "$thispth/Slib$thislib$Config_libext" ) ) {
}
use strict;
use ExtUtils::MakeMaker::Config;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::Liblist;
require ExtUtils::MakeMaker;
package ExtUtils::MM_AIX;
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_Any;
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
use Carp;
use File::Spec;
my @os_flavor = $mm->os_flavor;
@os_flavor is the style of operating system this is, usually
-corresponding to the MM_*.pm file we're using.
+corresponding to the MM_*.pm file we're using.
The first element of @os_flavor is the major family (ie. Unix,
Windows, VMS, OS/2, etc...) and the rest are sub families.
MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
OS/2 ('OS/2')
-This is used to write code for styles of operating system.
+This is used to write code for styles of operating system.
See os_flavor_is() for use.
$opts->{allow_variables} = 0 unless defined $opts->{allow_variables};
my $ql_opts = { allow_variables => $opts->{allow_variables} };
- my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) }
+ my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) }
split /\n/, $text;
if( $file ) {
my $redirect = $opts->{append} ? '>>' : '>';
# Leave Makefile.old around for realclean
push @m, <<'MAKE';
+ - $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
MAKE
for my $dir (@{$self->{DIR}}) {
my $subclean = $self->oneliner(sprintf <<'CODE', $dir);
-chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
+exit 0 unless chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
CODE
$clean .= "\t$subclean\n";
$self->{META_ADD} || {},
$self->{META_MERGE} || {},
);
-
+
_fix_metadata_before_conversion( \%metadata );
# paper over validation issues, but still complain, necessary because
# there's no guarantee that the above will fix ALL errors
my $meta = eval { CPAN::Meta->create( \%metadata, { lazy_validation => 1 } ) };
- warn $@ if $@ and
+ warn $@ if $@ and
$@ !~ /encountered CODE.*, but JSON can only represent references to arrays or hashes/;
# use the original metadata straight if the conversion failed
my @pairs = _sort_pairs($sort_sub, \%hash);
-Sorts the pairs of a hash based on keys ordered according
+Sorts the pairs of a hash based on keys ordered according
to C<$sort_sub>.
=end private
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
);
Implements a fake YAML dumper for a hash given
as a list of pairs. No quoting/escaping is done. Keys
-are supposed to be strings. Values are undef, strings,
+are supposed to be strings. Values are undef, strings,
hash refs or array refs of strings.
Supported options are:
delta => STR - indentation delta
use_header => BOOL - whether to include a YAML header
- indent => STR - a string of spaces
+ indent => STR - a string of spaces
default: ''
max_key_length => INT - maximum key length used to align
keys and values of the same hash
default: 20
- key_sort => CODE - a sort sub
+ key_sort => CODE - a sort sub
It may be undef, which means no sorting by keys
default: sub { lc $a cmp lc $b }
- customs => HASH - special options for certain keys
+ customs => HASH - special options for certain keys
(whose values are hashes themselves)
may contain: max_key_length, key_sort, customs
# Use a list to preserve order.
my @pairs;
- my $k_sort
- = exists $options->{key_sort} ? $options->{key_sort}
+ my $k_sort
+ = exists $options->{key_sort} ? $options->{key_sort}
: sub { lc $a cmp lc $b };
if ($k_sort) {
croak "'key_sort' should be a coderef" unless ref $k_sort eq 'CODE';
$k_options{$k} = $k_custom{$k} if exists $k_custom{$k};
}
}
- $yaml .= $indent . "$key:\n"
+ $yaml .= $indent . "$key:\n"
. _dump_hash(\%k_options, %$val);
}
else {
my $self = shift;
my %dump_options = (
- use_header => 1,
- delta => ' ' x 4,
+ use_header => 1,
+ delta => ' ' x 4,
key_sort => undef,
);
return _dump_hash(\%dump_options, @_);
return unless _has_cpan_meta();
_fix_metadata_before_conversion( $mymeta );
-
+
# this can still blow up
# not sure if i should just eval this and skip file creation if it
# blows up
{ my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
{ my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
- my $rm_cmd = join "\n\t", map { "$_" }
+ my $rm_cmd = join "\n\t", map { "$_" }
$self->split_command('- $(RM_F)', @files);
- my $rmf_cmd = join "\n\t", map { "$_" }
+ my $rmf_cmd = join "\n\t", map { "$_" }
$self->split_command('- $(RM_RF)', @dirs);
my $m = sprintf <<'MAKE', $rm_cmd, $rmf_cmd;
my $self = shift;
my $add_sign = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
-eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
+eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
or print "Could not add SIGNATURE to MANIFEST: $${'@'}\n"
CODE
carp "WARNING: Setting ABSTRACT via file ".
"'$self->{ABSTRACT_FROM}' failed\n";
}
+
+ if ($self->{ABSTRACT} && $self->{ABSTRACT} =~ m![[:cntrl:]]+!) {
+ warn "WARNING: ABSTRACT contains control character(s),".
+ " they will be removed\n";
+ $self->{ABSTRACT} =~ s![[:cntrl:]]+!!g;
+ return;
+ }
}
=head3 init_INST
unless ($self->{INST_LIB}){
if ($self->{PERL_CORE}) {
if (defined $Cross::platform) {
- $self->{INST_LIB} = $self->{INST_ARCHLIB} =
+ $self->{INST_LIB} = $self->{INST_ARCHLIB} =
$self->catdir($self->{PERL_LIB},"..","xlib",
$Cross::platform);
}
my @parentdir = split(/::/, $self->{PARENT_NAME});
$self->{INST_LIBDIR} = $self->catdir('$(INST_LIB)', @parentdir);
$self->{INST_ARCHLIBDIR} = $self->catdir('$(INST_ARCHLIB)', @parentdir);
- $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
+ $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
'$(FULLEXT)');
$self->{INST_ARCHAUTODIR} = $self->catdir('$(INST_ARCHLIB)', 'auto',
'$(FULLEXT)');
$self->init_lib2arch;
- # There are often no Config.pm defaults for these new man variables so
+ # There are often no Config.pm defaults for these new man variables so
# we fall back to the old behavior which is to use installman*dir
foreach my $num (1, 3) {
my $k = 'installsiteman'.$num.'dir';
unless $Config{installsitescript};
unless( $Config{installvendorbin} ) {
- $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
+ $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
? $Config{installbin}
: '';
}
}
- my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
+ my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
$Config{prefixexp} || $Config{prefix} || '';
my $vprefix = $Config{usevendorprefix} ? $Config{vendorprefixexp} : '';
my $sprefix = $Config{siteprefixexp} || '';
unless $Config{'installman'.$num.'dir'};
}
- my %bin_layouts =
+ my %bin_layouts =
(
bin => { s => $iprefix,
t => 'perl',
t => 'site',
d => 'bin' },
);
-
+
my %man_layouts =
(
man1dir => { s => $iprefix,
t => 'site',
d => 'site_perl',
style => $libstyle, },
-
+
archlib => { s => $iprefix,
t => 'perl',
d => "$version/$arch",
my $Installvar = uc "install$var";
if( $var =~ /arch/ ) {
- $self->{$Installvar} ||=
+ $self->{$Installvar} ||=
$self->catdir($self->{LIB}, $Config{archname});
}
else {
$d = "$style/$d" if $style;
$self->prefixify($installvar, $s, $r, $d);
- warn " $Installvar == $self->{$Installvar}\n"
+ warn " $Installvar == $self->{$Installvar}\n"
if $Verbose >= 2;
}
sub init_INSTALL_from_INSTALL_BASE {
my $self = shift;
- @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
+ @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
'$(INSTALL_BASE)';
my %install;
my $uc_thing = uc $thing;
my $key = "INSTALL".$dir.$uc_thing;
- $install{$key} ||=
+ $install{$key} ||=
$self->catdir('$(INSTALL_BASE)', @{$map{$thing}});
}
}
MM_VERSION: ExtUtils::MakeMaker Version
-MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
+MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
compat)
VERSION: version of your module
}
}
- # strip blanks
if (defined $self->{VERSION}) {
+ if ( $self->{VERSION} !~ /^\s*v?[\d_\.]+\s*$/ ) {
+ require version;
+ my $normal = eval { version->parse( $self->{VERSION} ) };
+ $self->{VERSION} = $normal if defined $normal;
+ }
$self->{VERSION} =~ s/^\s+//;
$self->{VERSION} =~ s/\s+$//;
}
SHELL Program used to run shell commands
ECHO Print text adding a newline on the end
- RM_F Remove a file
- RM_RF Remove a directory
- TOUCH Update a file's timestamp
- TEST_F Test for a file's existence
- CP Copy a file
- MV Move a file
+ RM_F Remove a file
+ RM_RF Remove a directory
+ TOUCH Update a file's timestamp
+ TEST_F Test for a file's existence
+ CP Copy a file
+ MV Move a file
CHMOD Change permissions on a file
FALSE Exit with non-zero
TRUE Exit with zero
$self->{CP} ||= $self->oneliner('cp', ["-MExtUtils::Command"]);
$self->{MV} ||= $self->oneliner('mv', ["-MExtUtils::Command"]);
- $self->{MOD_INSTALL} ||=
+ $self->{MOD_INSTALL} ||=
$self->oneliner(<<'CODE', ['-MExtUtils::Install']);
install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
CODE
$self->{DOC_INSTALL} ||= $self->oneliner('perllocal_install', ["-MExtUtils::Command::MM"]);
$self->{UNINSTALL} ||= $self->oneliner('uninstall', ["-MExtUtils::Command::MM"]);
- $self->{WARN_IF_OLD_PACKLIST} ||=
+ $self->{WARN_IF_OLD_PACKLIST} ||=
$self->oneliner('warn_if_old_packlist', ["-MExtUtils::Command::MM"]);
$self->{FIXIN} ||= $self->oneliner('MY->fixin(shift)', ["-MExtUtils::MY"]);
$self->{EQUALIZE_TIMESTAMP} ||= $self->oneliner('eqtime', ["-MExtUtils::Command"]);
# Not everybody uses -f to indicate "use this Makefile instead"
$self->{USEMAKEFILE} ||= '-f';
- # Some makes require a wrapper around macros passed in on the command
+ # Some makes require a wrapper around macros passed in on the command
# line.
$self->{MACROSTART} ||= '';
$self->{MACROEND} ||= '';
my(@libs) = $self->extliblist($libs);
if ($libs[0] or $libs[1] or $libs[2]){
# LD_RUN_PATH now computed by ExtUtils::Liblist
- ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
+ ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
$self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
last;
}
sub _fix_libs {
my($self, $libs) = @_;
- return !defined $libs ? [''] :
+ return !defined $libs ? [''] :
!ref $libs ? [$libs] :
!defined $libs->[0] ? [''] :
$libs ;
my $make_frag = $MM->tools_other;
-Returns a make fragment containing definitions for the macros init_others()
+Returns a make fragment containing definitions for the macros init_others()
initializes.
=cut
# We set PM_FILTER as late as possible so it can see all the earlier
# on macro-order sensitive makes such as nmake.
- for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
+ for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
FALSE TRUE
ECHO ECHO_N
USEMAKEFILE
PM_FILTER
FIXIN
- } )
+ } )
{
next unless defined $self->{$tool};
push @m, "$tool = $self->{$tool}\n";
sub tool_autosplit {
my($self, %attribs) = @_;
- my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
+ my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
: '';
my $asplit = $self->oneliner(sprintf <<'PERL_CODE', $maxlen);
my $arch = (grep length, $self->splitdir($pthinks))[-1];
print <<END unless $self->{UNINSTALLED_PERL};
-Your perl and your Config.pm seem to have different ideas about the
+Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [$arch]
Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
+This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
END
}
=cut
# An empty method here tickled a perl 5.8.1 bug and would return its object.
-sub extra_clean_files {
+sub extra_clean_files {
return;
}
sub libscan {
my($self,$path) = @_;
my($dirs,$file) = ($self->splitpath($path))[1,2];
- return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
+ return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
$self->splitdir($dirs), $file;
return $path;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.68';
+our $VERSION = '6.70';
=item os_flavor
sub init_linker {
my($self) = shift;
- $self->{PERL_ARCHIVE} ||=
+ $self->{PERL_ARCHIVE} ||=
File::Spec->catdir('$(PERL_INC)',$Config{libperl});
$self->{PERL_ARCHIVE_AFTER} ||= '';
$self->{EXPORT_LIST} ||= '';
require ExtUtils::MM_Win32;
our @ISA = qw( ExtUtils::MM_Unix );
-our $VERSION = '6.68';
+our $VERSION = '6.70';
=head1 NAME
}
$self->{PERL_ARCHIVE} = $libperl;
} else {
- $self->{PERL_ARCHIVE} =
+ $self->{PERL_ARCHIVE} =
'$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
}
=item maybe_command
-If our path begins with F</cygdrive/> then we use C<ExtUtils::MM_Win32>
-to determine if it may be a command. Otherwise we use the tests
-from C<ExtUtils::MM_Unix>.
+Determine whether a file is native to Cygwin by checking whether it
+resides inside the Cygwin installation (using Windows paths). If so,
+use C<ExtUtils::MM_Unix> to determine if it may be a command.
+Otherwise use the tests from C<ExtUtils::MM_Win32>.
=cut
sub maybe_command {
my ($self, $file) = @_;
- if ($file =~ m{^/cygdrive/}i) {
- return ExtUtils::MM_Win32->maybe_command($file);
- }
+ my $cygpath = Cygwin::posix_to_win_path('/', 1);
+ my $filepath = Cygwin::posix_to_win_path($file, 1);
- return $self->SUPER::maybe_command($file);
+ return (substr($filepath,0,length($cygpath)) eq $cygpath)
+ ? $self->SUPER::maybe_command($file) # Unix
+ : ExtUtils::MM_Win32->maybe_command($file); # Win32
}
=item dynamic_lib
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Unix );
}
-our $VERSION = '6.68';
+our $VERSION = '6.70';
=head1 NAME
sub init_dist {
my $self = shift;
-
+
# Thank you, Apple, for breaking tar and then breaking the work around.
# 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE while 10.5 wants
# COPYFILE_DISABLE. I'm not going to push my luck and instead just
# set both.
- $self->{TAR} ||=
+ $self->{TAR} ||=
'COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar';
-
+
$self->SUPER::init_dist(@_);
}
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
sub new {
die <<'UNSUPPORTED';
=over
-=cut
+=cut
use strict;
use ExtUtils::MakeMaker::Config;
use File::Basename;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
# To get Win32's setup.
$self->SUPER::init_platform;
- # incpath is copied to makefile var INCLUDE in constants sub, here just
+ # incpath is copied to makefile var INCLUDE in constants sub, here just
# make it empty
my $libpth = $Config{'libpth'};
$libpth =~ s( )(;);
if($self->{'base_import'}) {
$self->{'BASE_IMPORT'} .= ', ' . $self->{'base_import'};
}
-
+
$self->{'NLM_VERSION'} = $Config{'nlm_version'};
$self->{'MPKTOOL'} = $Config{'mpktool'};
$self->{'TOOLPATH'} = $Config{'toolpath'};
# Setup Win32's constants.
$make_frag .= $self->SUPER::platform_constants;
- foreach my $macro (qw(LIBPTH BASE_IMPORT NLM_VERSION MPKTOOL
+ foreach my $macro (qw(LIBPTH BASE_IMPORT NLM_VERSION MPKTOOL
TOOLPATH BOOT_SYMBOL NLM_SHORT_NAME INCLUDE PATH
MM_NW5_VERSION
))
# Taking care of long names like FileHandle, ByteLoader, SDBM_File etc
if($self->{NLM_SHORT_NAME}) {
- # In case of nlms with names exceeding 8 chars, build nlm in the
+ # In case of nlms with names exceeding 8 chars, build nlm in the
# current dir, rename and move to auto\lib.
$m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)}
} else {
if($self->{NLM_SHORT_NAME}) {
$m .= <<'MAKE_FRAG';
- if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT)
+ if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT)
move $(NLM_SHORT_NAME).$(DLEXT) $(INST_AUTODIR)
MAKE_FRAG
}
=back
-=cut
+=cut
use ExtUtils::MakeMaker qw(neatvalue);
use File::Spec;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
}
close $imp or die "Can't close tmpimp.imp";
# print "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp\n";
- system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp"
+ system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp"
and die "Cannot make import library: $!, \$?=$?";
# May be running under miniperl, so have no glob...
eval { unlink <tmp_imp/*>; 1 } or system "rm tmp_imp/*";
- system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}"
- and die "Cannot extract import objects: $!, \$?=$?";
+ system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}"
+ and die "Cannot extract import objects: $!, \$?=$?";
}
join('',@m);
}
my($self) = @_;
my $old = $self->ExtUtils::MM_Unix::static_lib();
return $old unless $self->{IMPORTS} && %{$self->{IMPORTS}};
-
+
my @chunks = split /\n{2,}/, $old;
shift @chunks unless length $chunks[0]; # Empty lines at the start
$chunks[0] .= <<'EOC';
package ExtUtils::MM_QNX;
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_UWIN;
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
# If we make $VERSION an our variable parse_version() breaks
use vars qw($VERSION);
-$VERSION = '6.68';
+$VERSION = '6.70';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
require ExtUtils::MM_Any;
our @ISA = qw(ExtUtils::MM_Any);
my %Is;
-BEGIN {
+BEGIN {
$Is{OS2} = $^O eq 'os2';
$Is{Win32} = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare';
$Is{Dos} = $^O eq 'dos';
my($self) = shift;
return '' unless $self->needs_linking();
my(@m);
-
+
my $command = '$(CCCMD)';
my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)';
-
+
if (my $cpp = $Config{cpprun}) {
my $cpp_cmd = $self->const_cccmd;
$cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
for my $macro (qw(
AR_STATIC_ARGS DIRFILESEP DFSEP
- NAME NAME_SYM
+ NAME NAME_SYM
VERSION VERSION_MACRO VERSION_SYM DEFINE_VERSION
XS_VERSION XS_VERSION_MACRO XS_DEFINE_VERSION
INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB
"DESTINSTALL".$_)
} $self->installvars),
qw(
- PERL_LIB
+ PERL_LIB
PERL_ARCHLIB
LIBPERL_A MYEXTLIB
- FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
- PERLMAINCC PERL_SRC PERL_INC
+ FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
+ PERLMAINCC PERL_SRC PERL_INC
PERL FULLPERL ABSPERL
PERLRUN FULLPERLRUN ABSPERLRUN
PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
PERL_CORE
PERM_DIR PERM_RW PERM_RWX
- ) )
+ ) )
{
next unless defined $self->{$macro};
MAKE
FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
LDFROM LINKTYPE BOOTDEP
- / )
+ / )
{
next unless defined $self->{$macro};
push @m, "$macro = $self->{$macro}\n";
push @m, q{
# Where is the Config information that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
-};
+} if -e File::Spec->catfile( $self->{PERL_INC}, 'config.h' );
push @m, qq{
COMPRESS compression command to gzip --best
use for tarfiles
- SUFFIX suffix to put on .gz
+ SUFFIX suffix to put on .gz
compressed files
SHAR shar command to use shar
PREOP extra commands to run before
- making the archive
+ making the archive
POSTOP extra commands to run after
making the archive
TO_UNIX a command to convert linefeeds
- to Unix style in your archive
+ to Unix style in your archive
CI command to checkin your ci -u
sources to version control
my($self, %attribs) = @_;
my $make = '';
- foreach my $key (qw(
+ foreach my $key (qw(
TAR TARFLAGS ZIP ZIPFLAGS COMPRESS SUFFIX SHAR
PREOP POSTOP TO_UNIX
CI RCS_LABEL DIST_CP DIST_DEFAULT
$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
veryclean : realclean
- $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
MAKE_FRAG
my($self) = shift;
my $make_frag = '';
- foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
+ foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
shdist))
{
my $method = $target.'_target';
$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
$(RM_RF) $(DISTVNAME)
$(COMPRESS) $(DISTVNAME).tar
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)'
$(POSTOP)
MAKE_FRAG
}
$(PREOP)
$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
$(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip'
$(POSTOP)
MAKE_FRAG
}
return <<'MAKE_FRAG';
uutardist : $(DISTVNAME).tar$(SUFFIX)
uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu'
MAKE_FRAG
}
$(PREOP)
$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
$(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar'
$(POSTOP)
MAKE_FRAG
}
$ldfrom = "-all $ldfrom -none" if $Is{OSF};
# The IRIX linker doesn't use LD_RUN_PATH
- my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
+ my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
qq{-rpath "$self->{LD_RUN_PATH}"} : '';
# For example in AIX the shared objects/libraries from previous builds
my ($abs, $val);
if ($self->file_name_is_absolute($name)) { # /foo/bar
$abs = $name;
- } elsif ($self->canonpath($name) eq
+ } elsif ($self->canonpath($name) eq
$self->canonpath(basename($name))) { # foo
$abs = $self->catfile($dir, $name);
} else { # foo/bar
my (@absdirs)
= reverse grep { $self->file_name_is_absolute($_) } $self->path;
$interpreter = '';
-
+
foreach my $dir (@absdirs) {
if ( $self->maybe_command($cmd) ) {
warn "Ignoring $interpreter in $file\n"
}
# Figure out how to invoke interpreter on this machine.
-
+
my ($does_shbang) = $Config{'sharpbang'} =~ /^\s*\#\!/;
my ($shb) = "";
if ($interpreter) {
($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
}
else {
- $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
+ $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
}
} elsif ($name =~ /\.(p[ml]|pod)\z/){
$pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
next unless $self->_has_pod($name);
$self->{MAN1PODS}->{$name} =
- $self->catfile("\$(INST_MAN1DIR)",
+ $self->catfile("\$(INST_MAN1DIR)",
basename($name).".\$(MAN1EXT)");
}
}
my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
# Remove "Configure.pm" and similar, if it's not the only pod listed
- # To force inclusion, just name it "Configure.pod", or override
+ # To force inclusion, just name it "Configure.pod", or override
# MAN3PODS
foreach my $name (keys %manifypods) {
if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) {
my $striplibpath;
my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
- $prefix = $self->{INST_LIB}
+ $prefix = $self->{INST_LIB}
if ($striplibpath = $path) =~ s{^(\W*)($parentlibs_re)\W}
{$1}i;
$self->{DIRFILESEP} = '/';
}
-
+
=item init_main
$self->{PERL_LIB} ||= $self->catdir("$self->{PERL_SRC}","lib");
if (defined $Cross::platform) {
- $self->{PERL_ARCHLIB} =
+ $self->{PERL_ARCHLIB} =
$self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform);
- $self->{PERL_INC} =
- $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform,
+ $self->{PERL_INC} =
+ $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform,
$Is{Win32}?("CORE"):());
}
else {
$self->{PERL_ARCHLIB} = $self->{PERL_LIB};
- $self->{PERL_INC} = ($Is{Win32}) ?
+ $self->{PERL_INC} = ($Is{Win32}) ?
$self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};
}
EOP
}
}
- }
+ }
}
# We get SITELIBEXP and SITEARCHEXP directly via
# architecture. If not we take it as a sign that it should be the
# same as the requested installation directory. Otherwise we take
# the found one.
- for my $libpair ({l=>"privlib", a=>"archlib"},
+ for my $libpair ({l=>"privlib", a=>"archlib"},
{l=>"sitelib", a=>"sitearch"},
{l=>"vendorlib", a=>"vendorarch"},
)
$self->prefixify($Arch,$ilib,$self->{$Lib});
unless (-d $self->{$Arch}) {
- print "Directory $self->{$Arch} not found\n"
+ print "Directory $self->{$Arch} not found\n"
if $Verbose;
$self->{$Arch} = $self->{$Lib};
}
my($self) = shift;
my @defpath = ();
- foreach my $component ($self->{PERL_SRC}, $self->path(),
- $Config{binexp})
+ foreach my $component ($self->{PERL_SRC}, $self->path(),
+ $Config{binexp})
{
push @defpath, $component if defined $component;
}
# Build up a set of file names (not command names).
my $thisperl = $self->canonpath($^X);
- $thisperl .= $Config{exe_ext} unless
+ $thisperl .= $Config{exe_ext} unless
# VMS might have a file version # at the end
$Is{VMS} ? $thisperl =~ m/$Config{exe_ext}(;\d+)?$/i
: $thisperl =~ m/$Config{exe_ext}$/i;
# When built for debugging, VMS doesn't create perl.exe but ndbgperl.exe.
my $perl_name = 'perl';
- $perl_name = 'ndbgperl' if $Is{VMS} &&
+ $perl_name = 'ndbgperl' if $Is{VMS} &&
defined $Config{usevmsdebug} && $Config{usevmsdebug} eq 'define';
# XXX This logic is flawed. If "miniperl" is anywhere in the path
# it will get confused. It should be fixed to work only on the filename.
# Define 'FULLPERL' to be a non-miniperl (used in test: target)
- ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/$perl_name/i
+ ($self->{FULLPERL} = $self->{PERL}) =~ s/\Q$miniperl\E$/$perl_name$Config{exe_ext}/i
unless $self->{FULLPERL};
# Little hack to get around VMS's find_perl putting "MCR" in front
$self->{$run} = "\$($perl)";
# Make sure perl can find itself before it's installed.
- $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
+ $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE};
- $self->{$perl.'RUNINST'} =
+ $self->{$perl.'RUNINST'} =
sprintf q{$(%sRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}, $perl;
}
my $self = shift;
if ($self->has_link_code()) {
- $self->{INST_STATIC} =
+ $self->{INST_STATIC} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT)$(LIB_EXT)');
- $self->{INST_DYNAMIC} =
+ $self->{INST_DYNAMIC} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(DLBASE).$(DLEXT)');
- $self->{INST_BOOT} =
+ $self->{INST_BOOT} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT).bs');
} else {
$self->{INST_STATIC} = '';
$self->{INST_DYNAMIC} = '';
$self->{INST_BOOT} = '';
}
-}
+}
=item install (o)
# Skip perl's libraries.
return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
- # Skip purified versions of libraries
+ # Skip purified versions of libraries
# (e.g., DynaLoader_pure_p1_c0_032.a)
return if m/_pure_\w+_\w+_\w+\.\w+$/ and -f "$File::Find::dir/.pure";
my($self) = shift;
my $caller = (caller(0))[3];
- confess("needs_linking called too early") if
+ confess("needs_linking called too early") if
$caller =~ /^ExtUtils::MakeMaker::/;
return $self->{NEEDS_LINKING} if defined $self->{NEEDS_LINKING};
if ($self->has_link_code or $self->{MAKEAPERL}){
next if $inpod || /^\s*#/;
chop;
next if /^\s*(if|unless|elsif)/;
+ s{\;\s*(?<![\\\$])\#.+?$}{}g;
if ( m{^ \s* package \s+ \w[\w\:\']* \s+ (v?[0-9._]+) \s* ; }x ) {
local $^W = 0;
$result = $1;
}
+ elsif ( m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* [!><=][!><=]}x ) {
+ next;
+ }
elsif ( m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* =}x ) {
- my $eval = qq{
- package ExtUtils::MakeMaker::_version;
- no strict;
- BEGIN { eval {
- # Ensure any version() routine which might have leaked
- # into this package has been deleted. Interferes with
- # version->import()
- undef *version;
- require version;
- "version"->import;
- } }
-
- local $1$2;
- \$$2=undef;
- do {
- $_
- };
- \$$2;
- };
- local $^W = 0;
- $result = eval($eval); ## no critic
- warn "Could not eval '$eval' in $parsefile: $@" if $@;
+ $result = $self->get_version($parsefile, $1, $2);
}
else {
next;
}
close $fh;
+ if ( defined $result && $result !~ /^v?[\d_\.]+$/ ) {
+ require version;
+ my $normal = eval { version->parse( $result ) };
+ $result = $normal if defined $normal;
+ }
$result = "undef" unless defined $result;
return $result;
}
+sub get_version
+{
+ my ($self, $parsefile, $sigil, $name) = @_;
+ my $eval = qq{
+ package ExtUtils::MakeMaker::_version;
+ no strict;
+ BEGIN { eval {
+ # Ensure any version() routine which might have leaked
+ # into this package has been deleted. Interferes with
+ # version->import()
+ undef *version;
+ require version;
+ "version"->import;
+ } }
+
+ local $sigil$name;
+ \$$name=undef;
+ do {
+ $_
+ };
+ \$$name;
+ };
+ local $^W = 0;
+ my $result = eval($eval); ## no critic
+ warn "Could not eval '$eval' in $parsefile: $@" if $@;
+ $result;
+}
+
=item pasthru (o)
foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE
PREFIX INSTALL_BASE)
- )
+ )
{
next unless defined $self->{$key};
push @pasthru, "$key=\"\$($key)\"";
$self->{PPM_INSTALL_EXEC}, $self->{PPM_INSTALL_SCRIPT};
}
else {
- $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
+ $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
$self->{PPM_INSTALL_SCRIPT};
}
}
$MM->prefixify($var, $prefix, $new_prefix, $default);
Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to
-replace it's $prefix with a $new_prefix.
+replace it's $prefix with a $new_prefix.
Should the $prefix fail to match I<AND> a PREFIX was given as an
argument to WriteMakefile() it will set it to the $new_prefix +
sub prefixify {
my($self,$var,$sprefix,$rprefix,$default) = @_;
- my $path = $self->{uc $var} ||
+ my $path = $self->{uc $var} ||
$Config_Override{lc $var} || $Config{lc $var} || '';
$rprefix .= '/' if $sprefix =~ m|/$|;
warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
if( $self->{ARGS}{PREFIX} &&
- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
+ $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
{
warn " cannot prefix, using default.\n" if $Verbose >= 2;
$switches = join ' ', @$switches;
- return qq{\$(ABSPERLRUN) $switches -e $cmd --};
+ return qq{\$(ABSPERLRUN) $switches -e $cmd --};
}
$(CP) $(MYEXTLIB) $@
MAKE_FRAG
- my $ar;
+ my $ar;
if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) {
# Prefer the absolute pathed ar if available so that PATH
- # doesn't confuse us. Perl itself is built with the full_ar.
+ # doesn't confuse us. Perl itself is built with the full_ar.
$ar = 'FULL_AR';
} else {
$ar = 'AR';
sub subdir_x {
my($self, $subdir) = @_;
- my $subdir_cmd = $self->cd($subdir,
+ my $subdir_cmd = $self->cd($subdir,
'$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)'
);
return sprintf <<'EOT', $subdir_cmd;
push(@m, "\n");
push(@m, "test_dynamic :: pure_all\n");
- push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
+ push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
if $tests;
- push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
+ push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
if -f "test.pl";
push(@m, "\n");
push(@m, "testdb_dynamic :: pure_all\n");
- push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
+ push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
'$(TEST_FILE)'));
push(@m, "\n");
}
if ($Is{VMS} &&
- $Config{'ldflags'} &&
+ $Config{'ldflags'} &&
$Config{'ldflags'} =~ m!/Debug!i &&
(!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)
- )
+ )
{
unshift(@tmargs,'-nolinenumbers');
}
XSPROTOARG = $self->{XSPROTOARG}
XSUBPPDEPS = @tmdeps \$(XSUBPP)
XSUBPPARGS = @tmargs
-XSUBPP_EXTRA_ARGS =
+XSUBPP_EXTRA_ARGS =
};
};
use File::Basename;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
if (@pm == 1) { ($defpm = $pm[0]) =~ s/.pm$//; }
elsif (@pm) {
%xs = map { s/.xs$//; ($_,1) } glob('*.xs'); ## no critic
- if (keys %xs) {
- foreach my $pm (@pm) {
- $defpm = $pm, last if exists $xs{$pm};
- }
+ if (keys %xs) {
+ foreach my $pm (@pm) {
+ $defpm = $pm, last if exists $xs{$pm};
+ }
}
}
}
$inabs++ if $self->file_name_is_absolute($dir);
if ($inabs == 1) {
# We've covered relative dirs; everything else is an absolute
- # dir (probably an installed location). First, we'll try
- # potential command names, to see whether we can avoid a long
+ # dir (probably an installed location). First, we'll try
+ # potential command names, to see whether we can avoid a long
# MCR expression.
foreach my $name (@snames) {
push(@cand,$name) if $name =~ /^[\w\-\$]+$/;
print "Checking $name\n" if $trace >= 2;
# If it looks like a potential command, try it without the MCR
if ($name =~ /^[\w\-\$]+$/) {
- open(my $tcf, ">", "temp_mmvms.com")
+ open(my $tcf, ">", "temp_mmvms.com")
or die('unable to open temp file');
print $tcf "\$ set message/nofacil/nosever/noident/notext\n";
print $tcf "\$ $name -e \"require $ver; print \"\"VER_OK\\n\"\"\"\n";
}
$self->{DEFINE} = '';
- if (@defs) {
- $self->{DEFINE} = '/Define=(' . join(',',@defs) . ')';
+ if (@defs) {
+ $self->{DEFINE} = '/Define=(' . join(',',@defs) . ')';
}
- if (@udefs) {
- $self->{DEFINE} .= '/Undef=(' . join(',',@udefs) . ')';
+ if (@udefs) {
+ $self->{DEFINE} .= '/Undef=(' . join(',',@udefs) . ')';
}
}
}
$self->{EQUALIZE_TIMESTAMP} ||= '$(ABSPERLRUN) -we "open F,qq{>>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"';
- $self->{MOD_INSTALL} ||=
+ $self->{MOD_INSTALL} ||=
$self->oneliner(<<'CODE', ['-MExtUtils::Install']);
install([ from_to => {split(' ', <STDIN>)}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
CODE
# Cleanup paths for directories in MMS macros.
foreach my $macro ( qw [
- INST_BIN INST_SCRIPT INST_LIB INST_ARCHLIB
+ INST_BIN INST_SCRIPT INST_LIB INST_ARCHLIB
PERL_LIB PERL_ARCHLIB
PERL_INC PERL_SRC ],
(map { 'INSTALL'.$_ } $self->installvars)
- )
+ )
{
next unless defined $self->{$macro};
next if $macro =~ /MAN/ && $self->{$macro} eq 'none';
}
# Cleanup paths for files in MMS macros.
- foreach my $macro ( qw[LIBPERL_A FIRST_MAKEFILE MAKEFILE_OLD
- MAKE_APERL_FILE MYEXTLIB] )
+ foreach my $macro ( qw[LIBPERL_A FIRST_MAKEFILE MAKEFILE_OLD
+ MAKE_APERL_FILE MYEXTLIB] )
{
next unless defined $self->{$macro};
$self->{$macro} = $self->fixpath($self->{$macro},0);
next unless $self ne " " && defined $self->{$macro};
my %tmp = ();
for my $key (keys %{$self->{$macro}}) {
- $tmp{$self->fixpath($key,0)} =
+ $tmp{$self->fixpath($key,0)} =
$self->fixpath($self->{$macro}{$key},0);
}
$self->{$macro} = \%tmp;
COMPRESS compression command to gzip
use for tarfiles
- SUFFIX suffix to put on -gz
+ SUFFIX suffix to put on -gz
compressed files
SHAR shar command to use vms_share
=item dlsyms (override)
Create VMS linker options files specifying universal symbols for this
-extension's shareable image, and listing other shareable images or
+extension's shareable image, and listing other shareable images or
libraries to which it should be linked.
=cut
push @m, ' $(PERL) -e "print ""$(INST_STATIC)/Include=';
if ($self->{OBJECT} =~ /\bBASEEXT\b/ or
- $self->{OBJECT} =~ /\b$self->{BASEEXT}\b/i) {
+ $self->{OBJECT} =~ /\b$self->{BASEEXT}\b/i) {
push @m, ($Config{d_vms_case_sensitive_symbols}
? uc($self->{BASEEXT}) :'$(BASEEXT)');
}
} else {
push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)',"\n");
}
-
+
push @m, "\t\$(NOECHO) \$(PERL) -e 1 >\$(INST_ARCHAUTODIR)extralibs.ld\n";
foreach my $lib (split ' ', $self->{EXTRALIBS}) {
push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n");
sub makeaperl {
my($self, %attribs) = @_;
- my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmpdir, $libperl) =
+ my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmpdir, $libperl) =
@attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};
my(@m);
push @m, "
# We trust that what has been handed in as argument will be buildable
$static = [] unless $static;
@olbs{@{$static}} = (1) x @{$static};
-
+
$extra = [] unless $extra && ref $extra eq 'ARRAY';
# Sort the object libraries in inverse order of
# filespec length to try to insure that dependent extensions
$rprefix = vmspath($rprefix) if $rprefix;
$sprefix = vmspath($sprefix) if $sprefix;
- $default = vmsify($default)
+ $default = vmsify($default)
unless $default =~ /\[.*\]/;
(my $var_no_install = $var) =~ s/^install//;
- my $path = $self->{uc $var} ||
- $ExtUtils::MM_Unix::Config_Override{lc $var} ||
+ my $path = $self->{uc $var} ||
+ $ExtUtils::MM_Unix::Config_Override{lc $var} ||
$Config{lc $var} || $Config{lc $var_no_install};
if( !$path ) {
my $ql_opts = { allow_variables => $opts->{allow_variables} };
my @cmds = ("\$(NOECHO) $opencmd MMECHOFILE $file ");
- push @cmds, map { '$(NOECHO) Write MMECHOFILE '.$self->quote_literal($_, $ql_opts) }
+ push @cmds, map { '$(NOECHO) Write MMECHOFILE '.$self->quote_literal($_, $ql_opts) }
split /\n/, $text;
push @cmds, '$(NOECHO) Close MMECHOFILE';
return @cmds;
my($head,$macro,$tail);
# perform m##g in scalar context so it acts as an iterator
- while ($npath =~ m#(.*?)\$\((\S+?)\)(.*)#gs) {
+ while ($npath =~ m#(.*?)\$\((\S+?)\)(.*)#gs) {
if (defined $self->{$2}) {
($head,$macro,$tail) = ($1,$2,$3);
if (ref $self->{$macro}) {
split /[ \t]+/, $path;
}
- if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {
+ if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {
if ($force_path or $path =~ /(?:DIR\)|\])\Z(?!\n)/) {
$fixedpath = vmspath($self->eliminate_macros($path));
}
package ExtUtils::MM_VOS;
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
there. This package overrides the implementation of these methods, not
the semantics.
-=cut
+=cut
use ExtUtils::MakeMaker::Config;
use File::Basename;
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.68';
+our $VERSION = '6.70';
$ENV{EMXSHELL} = 'sh'; # to run `commands`
$self->{NOOP} ||= 'rem';
$self->{DEV_NULL} ||= '> NUL';
- $self->{FIXIN} ||= $self->{PERL_CORE} ?
- "\$(PERLRUN) $self->{PERL_SRC}/win32/bin/pl2bat.pl" :
+ $self->{FIXIN} ||= $self->{PERL_CORE} ?
+ "\$(PERLRUN) $self->{PERL_SRC}/win32/bin/pl2bat.pl" :
'pl2bat.bat';
$self->SUPER::init_tools;
$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
');
if ($GCC) {
- push(@m,
+ push(@m,
q{ }.$DLLTOOL.q{ --def $(EXPORT_LIST) --output-exp dll.exp
$(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
}.$DLLTOOL.q{ --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
# $(MACRO)s in makefiles.
s{([<>|&^@!])}{^$1}g foreach grep { !/^"[^"]*"$/ } @text;
$text = join('', @text);
-
+
# dmake expands {{ to { and }} to }.
if( $self->is_make_type('dmake') ) {
$text =~ s/{/{{/g;
=back
-=cut
+=cut
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
';
}
-=item xs_o
+=item xs_o
The && problem.
use strict;
require ExtUtils::MM;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
our @ISA = qw(ExtUtils::MM);
{
my @Prepend_parent;
my %Recognized_Att_Keys;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
# Emulate something resembling CVS $Revision$
our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists
&WriteEmptyMakefile);
-# These will go away once the last of the Win32 & VMS specific code is
+# These will go away once the last of the Win32 & VMS specific code is
# purged.
my $Is_VMS = $^O eq 'VMS';
my $Is_Win32 = $^O eq 'MSWin32';
my %att = @_;
_convert_compat_attrs(\%att);
-
+
_verify_att(\%att);
my $mm = MM->new(\%att);
sub _format_att {
my $given = shift;
-
+
return $given eq '' ? "string/number"
: uc $given eq $given ? "$given reference"
: "$given object"
sub prompt ($;$) { ## no critic
my($mess, $def) = @_;
- confess("prompt function called without an argument")
+ confess("prompt function called without an argument")
unless defined $mess;
my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
- PERL_LIB PERL_ARCHLIB
- SITELIBEXP SITEARCHEXP
+ PERL_LIB PERL_ARCHLIB
+ SITELIBEXP SITEARCHEXP
INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE
LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
# in Overridable we have subroutines that are used indirectly
- @MM_Sections =
+ @MM_Sections =
qw(
- post_initialize const_config constants platform_constants
- tool_autosplit tool_xsubpp tools_other
+ post_initialize const_config constants platform_constants
+ tool_autosplit tool_xsubpp tools_other
makemakerdflt
top_targets blibdirs linkext dlsyms dynamic dynamic_bs
dynamic_lib static static_lib manifypods processPL
installbin subdirs
- clean_subdirs clean realclean_subdirs realclean
+ clean_subdirs clean realclean_subdirs realclean
metafile signature
dist_basics dist_core distdir dist_test dist_ci distmeta distsignature
install force perldepend makefile staticmake test ppd
push @Overridable, qw[
libscan makeaperl needs_linking
- subdir_x test_via_harness test_via_script
+ subdir_x test_via_harness test_via_script
init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan
init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker
@Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
# we will use all these variables in the Makefile
- @Get_from_Config =
+ @Get_from_Config =
qw(
- ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
- lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
+ ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
+ lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
sitelibexp sitearchexp so
);
}
my $perl_version_ok = eval {
- local $SIG{__WARN__} = sub {
+ local $SIG{__WARN__} = sub {
# simulate "use warnings FATAL => 'all'" for vintage perls
die @_;
};
$pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
if (!$installed_file) {
- warn sprintf "Warning: prerequisite %s %s not found.\n",
+ warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $required_version
unless $self->{PREREQ_FATAL}
or $ENV{PERL_CORE};
}
elsif ($pr_version < $required_version ){
warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
- $prereq, $required_version, ($pr_version || 'unknown version')
+ $prereq, $required_version, ($pr_version || 'unknown version')
unless $self->{PREREQ_FATAL}
or $ENV{PERL_CORE};
}
if (%unsatisfied && $self->{PREREQ_FATAL}){
- my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
+ my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
sort { $a cmp $b } keys %unsatisfied;
die <<"END";
MakeMaker FATAL: prerequisites not found.
Please install these modules first and rerun 'perl Makefile.PL'.
END
}
-
+
if (defined $self->{CONFIGURE}) {
if (ref $self->{CONFIGURE} eq 'CODE') {
%configure_att = %{&{$self->{CONFIGURE}}};
}
if ($self->{PARENT}) {
$self->{PARENT}->{CHILDREN}->{$newclass} = $self;
- foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE)) {
+ foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE LD OPTIMIZE)) {
if (exists $self->{PARENT}->{$opt}
and not exists $self->{$opt})
{
# still trying to reduce the list to some reasonable minimum --
# because I want to make it easier for the user. A.K.
- local $SIG{__WARN__} = sub {
+ local $SIG{__WARN__} = sub {
# can't use 'no warnings redefined', 5.6 only
- warn @_ unless $_[0] =~ /^Subroutine .* redefined/
+ warn @_ unless $_[0] =~ /^Subroutine .* redefined/
};
foreach my $method (@Overridable) {
make test TEST_VERBOSE=1
+If you want to run particular test files, set the C<TEST_FILES> variable.
+It is possible to use globbing with this mechanism.
+
+ make test TEST_FILES='t/foobar.t t/dagobah*.t'
+
=head2 make testdb
A useful variation of the above is the target C<testdb>. It runs the
perl -le 'print join $/, @INC'
Sometimes older versions of the module you're installing live in other
-directories in @INC. Because Perl loads the first version of a module it
+directories in @INC. Because Perl loads the first version of a module it
finds, not the newest, you might accidentally get one of these older
versions even after installing a brand new version. To delete I<all other
versions of the module you're installing> (not simply older ones) set the
INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
the best:
- perl Makefile.PL;
- make;
+ perl Makefile.PL;
+ make;
make test
make install
=head2 Using Attributes and Parameters
The following attributes may be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line.
+or as NAME=VALUE pairs on the command line. Attributes that became
+available with later versions of MakeMaker are indicated.
+
+In order to maintain portability of attributes with older versions of
+MakeMaker you may want to use L<App::EUMM::Upgrade> with your C<Makefile.PL>.
=over 2
=item BUILD_REQUIRES
+Available in version 6.5503 and above.
+
A hash of modules that are needed to build your module but not run it.
This will go into the C<build_requires> field of your CPAN Meta file.
=item CONFIGURE_REQUIRES
+Available in version 6.52 and above.
+
A hash of modules that are required to run Makefile.PL itself, but not
to run your distribution.
=item DISTNAME
-A safe filename for the package.
+A safe filename for the package.
Defaults to NAME below but with :: replaced with -.
=item INSTALLSITEMAN3DIR
These directories get the man pages at 'make install' time if
-INSTALLDIRS=site (default). Defaults to
+INSTALLDIRS=site (default). Defaults to
$(SITEPREFIX)/man/man$(MAN*EXT).
If set to 'none', no man pages will be installed.
=item LICENSE
+Available in version 6.31 and above.
+
The licensing terms of your distribution. Generally it's "perl" for the
same license as Perl itself.
=item META_MERGE
+Available in version 6.46 and above.
+
A hashref of items to add to the CPAN Meta file (F<META.yml> or
F<META.json>).
"meta-spec" => { version => 2 },
- repository => {
- type => 'git',
- url => 'git://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker.git',
- web => 'https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker',
+ resources => {
+
+ repository => {
+ type => 'git',
+ url => 'git://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker.git',
+ web => 'https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker',
+ },
+
},
},
=item MIN_PERL_VERSION
+Available in version 6.48 and above.
+
The minimum required version of Perl for this distribution.
Either the 5.006001 or the 5.6.1 format is acceptable.
It is I<extremely> rare to have to use C<PREREQ_FATAL>. Its use by module
authors is I<strongly discouraged> and should never be used lightly.
+For dependencies that are required in order to run C<Makefile.PL>,
+see C<CONFIGURE_REQUIRES>.
+
Module installation tools have ways of resolving unmet dependencies but
to do that they need a F<Makefile>. Using C<PREREQ_FATAL> breaks this.
That's bad.
L<version> objects are fine. As of MakeMaker 6.35 version.pm will be
automatically loaded, but you must declare the dependency on version.pm.
-For compatibility with older MakeMaker you should load on the same line
+For compatibility with older MakeMaker you should load on the same line
as $VERSION is declared.
# All on one line
needed to build a new distribution as long as you are sure that the
MANIFEST file is ok.
+=item make veryclean
+
+does a realclean first and then removes backup files such as C<*~>,
+C<*.bak>, C<*.old> and C<*.orig>
+
=item make manifest
rewrites the MANIFEST file, adding all remaining files found (See
If C<prompt()> detects that it is not running interactively and there
is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable
is set to true, the $default will be used without prompting. This
-prevents automated processes from blocking on user input.
+prevents automated processes from blocking on user input.
If no $default is provided an empty string will be used instead.
use strict;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
use Config ();
package ExtUtils::MakeMaker::FAQ;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
1;
__END__
do that. Use at your own risk. Have fun blowing holes in your foot.
#!/usr/bin/perl -w
-
+
use strict;
-
+
use File::Spec;
use File::Find;
use ExtUtils::Manifest qw(maniread);
=item Which tar should I use on Windows?
-We recommend ptar from Archive::Tar not older than 1.66 with '-C' option.
+We recommend ptar from Archive::Tar not older than 1.66 with '-C' option.
=item Which zip should I use on Windows for '[nd]make zipdist'?
package ExtUtils::MakeMaker::Tutorial;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
=head1 NAME
# There's just too much Dynaloader incest here to turn on strict vars.
use strict 'refs';
-our $VERSION = '6.68';
+our $VERSION = '6.70';
require Exporter;
our @ISA = ('Exporter');
our @ISA = qw(Exporter);
our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.68';
+our $VERSION = '6.70';
sub Mksymlists {
my(%spec) = @_;
my $distname = $data->{DISTNAME} || $data->{NAME};
$distname = "Distribution $distname";
my $patchlevel = " pl$Config{perl_patchlevel}" || '';
- my $comment = sprintf "Perl (v%s%s%s) module %s",
+ my $comment = sprintf "Perl (v%s%s%s) module %s",
$Config::Config{version}, $threaded, $patchlevel, $data->{NAME};
chomp $comment;
if ($data->{INSTALLDIRS} and $data->{INSTALLDIRS} eq 'perl') {
if ($isvax) { print $opt "UNIVERSAL=$safe\n" }
else { print $opt "SYMBOL_VECTOR=($safe=DATA)\n"; }
}
-
+
close $opt;
}
use strict;
use warnings;
-our $VERSION = '6.68';
+our $VERSION = '6.70';
use Cwd;
use File::Spec;
# So the tests can chdir around and not break @INC.
# We use getcwd() because otherwise rel2abs will blow up under taint
# mode pre-5.8. We detaint is so @INC won't be tainted. This is
-# no worse, and probably better, than just shoving an untainted,
+# no worse, and probably better, than just shoving an untainted,
# relative "blib/lib" onto @INC.
my $cwd;
BEGIN {
plan skip_all => 'No MANIFEST'
unless -e "../MANIFEST";
-
+
chdir "..";
my $manifest = "MANIFEST";
open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!";
-my @modules = map { m{^lib/(\S+)}; $1 }
- grep { m{^lib/\S+\.pm} }
+my @modules = map { m{^lib/(\S+)}; $1 }
+ grep { m{^lib/\S+\.pm} }
<$manifest_fh>;
chomp @modules;
# INST_*
-is( $mm->{INST_ARCHLIB},
+is( $mm->{INST_ARCHLIB},
$mm->{PERL_CORE} ? $mm->{PERL_ARCHLIB}
: File::Spec->catdir($Curdir, 'blib', 'arch'),
'INST_ARCHLIB');
is( keys %{$mm->{CHILDREN}}, 1 );
my($child_pack) = keys %{$mm->{CHILDREN}};
my $c_mm = $mm->{CHILDREN}{$child_pack};
-is( $c_mm->{INST_ARCHLIB},
+is( $c_mm->{INST_ARCHLIB},
$c_mm->{PERL_CORE} ? $c_mm->{PERL_ARCHLIB}
: File::Spec->catdir($Updir, 'blib', 'arch'),
'CHILD INST_ARCHLIB');
my $inst_lib = File::Spec->catdir($Curdir, 'blib', 'lib');
-is( $mm->{INST_LIB},
+is( $mm->{INST_LIB},
$mm->{PERL_CORE} ? $mm->{PERL_LIB} : $inst_lib, 'INST_LIB' );
diag(@mpl_out);
my $makefile = makefile_name();
-ok( grep(/^Writing $makefile for Big::Dummy/,
+ok( grep(/^Writing $makefile for Big::Dummy/,
@mpl_out) == 1,
'Makefile.PL output looks right');
ok( -r '../dummy-install', ' install dir created' );
-my @installed_files =
+my @installed_files =
('../dummy-install/lib/perl5/Big/Dummy.pm',
'../dummy-install/lib/perl5/Big/Liar.pm',
'../dummy-install/bin/program',
while( my($type, $vars) = each %Install_Vars) {
SKIP: {
- skip "VMS must expand macros in INSTALL* vars", scalar @$vars
- if $Is_VMS;
+ skip "VMS must expand macros in INSTALL* vars", scalar @$vars
+ if $Is_VMS;
skip '$Config{usevendorprefix} not set', scalar @$vars
if $type eq 'VENDOR' and !$Config{usevendorprefix};
if $mm->{uc $installvar} =~ /^\$\(INSTALL.*\)$/;
# support for man page skipping
- $prefix = 'none' if $type eq 'PERL' &&
- $var =~ /man/ &&
+ $prefix = 'none' if $type eq 'PERL' &&
+ $var =~ /man/ &&
!$Config{$installvar};
- like( $mm->{uc $installvar}, qr/^\Q$prefix\E/,
+ like( $mm->{uc $installvar}, qr/^\Q$prefix\E/,
"$prefix + $var" );
}
}
INSTALLMAN3DIR=> 'foo/bar/baz',
);
- is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'),
+ is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'),
'installvendorman1dir (in %Config) not modified' );
- isnt( $mm->{INSTALLVENDORMAN3DIR}, '',
+ isnt( $mm->{INSTALLVENDORMAN3DIR}, '',
'installvendorman3dir (not in %Config) set' );
}
}
-# Check that when usevendoprefix and installvendorman*dir aren't set in
+# Check that when usevendoprefix and installvendorman*dir aren't set in
# Config it leaves them unset.
{
_set_config(installman1dir => File::Spec->catdir('foo', 'bar') );
use_ok( 'ExtUtils::Liblist' );
}
-ok( defined &ExtUtils::Liblist::ext,
+ok( defined &ExtUtils::Liblist::ext,
'ExtUtils::Liblist::ext() defined for backwards compat' );
{
my @flavors = MM->os_flavor;
ok( @flavors, 'os_flavor() returned something' );
-ok( MM->os_flavor_is($flavors[rand @flavors]),
+ok( MM->os_flavor_is($flavors[rand @flavors]),
'os_flavor_is() one flavor' );
ok( MM->os_flavor_is($flavors[rand @flavors], 'BogusOS'),
' many flavors' );
# Does this mimic ExtUtils::MakeMaker ok?
{
@MM::ISA = qw(
- ExtUtils::MM_Unix
- ExtUtils::Liblist::Kid
+ ExtUtils::MM_Unix
+ ExtUtils::Liblist::Kid
ExtUtils::MakeMaker
);
# MM package faked up by messy MI entanglement
# init_linker
{
- my $libperl = File::Spec->catfile('$(PERL_INC)',
+ my $libperl = File::Spec->catfile('$(PERL_INC)',
$Config{libperl} || 'libperl.a' );
my $export = '';
my $after = '';
# ExtUtils::MM_Cygwin::cflags() calls this, fake the output
{
- local $SIG{__WARN__} = sub {
+ local $SIG{__WARN__} = sub {
warn @_ unless $_[0] =~ /^Subroutine .* redefined/;
};
*ExtUtils::MM_Unix::cflags = sub { return $_[1] };
skip( '$ENV{COMSPEC} not set', 2 )
unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i;
my $comspec = $1;
- is( $MM->maybe_command( $comspec ),
+ is( $MM->maybe_command( $comspec ),
$comspec, 'COMSPEC is a maybe_command()' );
( my $comspec2 = $comspec ) =~ s|\..{3}$||;
- like( $MM->maybe_command( $comspec2 ),
- qr/\Q$comspec/i,
+ like( $MM->maybe_command( $comspec2 ),
+ qr/\Q$comspec/i,
'maybe_command() without extension' );
}
my $had_pathext = exists $ENV{PATHEXT};
{
local $ENV{PATHEXT} = '.exe';
- ok( ! $MM->maybe_command( 'not_a_command.com' ),
+ ok( ! $MM->maybe_command( 'not_a_command.com' ),
'not a maybe_command()' );
}
# Bug in Perl. local $ENV{FOO} won't delete the key afterward.
# file_name_is_absolute() [Does not support UNC-paths]
{
- ok( $MM->file_name_is_absolute( 'SYS:/' ),
+ ok( $MM->file_name_is_absolute( 'SYS:/' ),
'file_name_is_absolute()' );
ok( ! $MM->file_name_is_absolute( 'some/path/' ),
'not file_name_is_absolute()' );
}
-# find_perl()
+# find_perl()
# Should be able to find running perl... $^X is OK on NW5
{
my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t?
my( $perl, $path ) = fileparse( $my_perl );
- like( $MM->find_perl( $], [ $perl ], [ $path ] ),
+ like( $MM->find_perl( $], [ $perl ], [ $path ] ),
qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' );
}
{
my @path_eg = qw( SYS trick dir/now_OK );
- is( $MM->catdir( @path_eg ),
+ is( $MM->catdir( @path_eg ),
'SYS\\trick\\dir\\now_OK', 'catdir()' );
- is( $MM->catdir( @path_eg ),
- File::Spec->catdir( @path_eg ),
+ is( $MM->catdir( @path_eg ),
+ File::Spec->catdir( @path_eg ),
'catdir() eq File::Spec->catdir()' );
# catfile() (calls MM_NW5->catdir)
is( $MM->catfile( @path_eg ),
'SYS\\trick\\dir\\now_OK\\file.ext', 'catfile()' );
- is( $MM->catfile( @path_eg ),
- File::Spec->catfile( @path_eg ),
+ is( $MM->catfile( @path_eg ),
+ File::Spec->catfile( @path_eg ),
'catfile() eq File::Spec->catfile()' );
}
{
my $mm_w32 = bless( {}, 'MM' );
$mm_w32->init_others();
- my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP
+ my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP
TEST_F LD AR LDLOADLIBS DEV_NULL );
for my $key ( @keys ) {
ok( $mm_w32->{ $key }, "init_others: $key" );
# constants()
{
my $mm_w32 = bless {
- NAME => 'TestMM_NW5',
+ NAME => 'TestMM_NW5',
VERSION => '1.00',
VERSION_FROM => 'TestMM_NW5',
PM => { 'MM_NW5.pm' => 1 },
skip( "Can't write to temp file: $!", 4 )
unless close SCRIPT;
# now start tests:
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 3 )
unless rename $script_name, "${script_name}.pl";
$script_ext = '.pl';
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 2 )
unless rename "${script_name}$script_ext", "${script_name}.bat";
$script_ext = '.bat';
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 1 )
$script_ext = '.noscript';
isnt( $MM->perl_script( $script_name ),
- "${script_name}$script_ext",
+ "${script_name}$script_ext",
"not a perl_script anymore ($script_ext)" );
is( $MM->perl_script( $script_name ), undef,
"perl_script ($script_ext) returns empty" );
use File::Spec;
use_ok( 'ExtUtils::MM_OS2' );
-ok( grep( 'ExtUtils::MM_OS2', @MM::ISA),
+ok( grep( 'ExtUtils::MM_OS2', @MM::ISA),
'ExtUtils::MM_OS2 should be parent of MM' );
# dlsyms
-my $mm = bless({
- SKIPHASH => {
- dynamic => 1
- },
+my $mm = bless({
+ SKIPHASH => {
+ dynamic => 1
+ },
NAME => 'foo:bar::',
}, 'ExtUtils::MM_OS2');
-is( $mm->dlsyms(), '',
+is( $mm->dlsyms(), '',
'dlsyms() should return nothing with dynamic flag set' );
$mm->{BASEEXT} = 'baseext';
my $res = $mm->dlsyms();
like( $res, qr/baseext\.def: Makefile/,
'... without flag, should return make targets' );
-like( $res, qr/"DL_FUNCS" => \{ \}/,
+like( $res, qr/"DL_FUNCS" => \{ \}/,
'... should provide empty hash refs where necessary' );
like( $res, qr/"DL_VARS" => \[]/, '... and empty array refs too' );
$mm->{FUNCLIST} = 'funclist';
$res = $mm->dlsyms( IMPORTS => 'imports' );
-like( $res, qr/"FUNCLIST" => .+funclist/,
+like( $res, qr/"FUNCLIST" => .+funclist/,
'... should pick up values from object' );
like( $res, qr/"IMPORTS" => .+imports/, '... and allow parameter options too' );
local $@;
eval { $mm->dlsyms() };
- like( $@, qr/Can.t mkdir tmp_imp/,
+ like( $@, qr/Can.t mkdir tmp_imp/,
'... should die if directory cannot be made' );
unlink('tmp_imp') or skip("Cannot remove test file: $!", 9);
eval { $mm->dlsyms() };
like( $sysargs, qr/^emximp/, '... should try to call system() though' );
- like( $@, qr/Cannot make import library/,
+ like( $@, qr/Cannot make import library/,
'... should die if emximp syscall fails' );
# sysfail is 0 now, call emximp call should succeed
eval { $mm->dlsyms() };
is( $unlinked, 1, '... should attempt to unlink temp files' );
- like( $@, qr/Cannot extract import/,
+ like( $@, qr/Cannot extract import/,
'... should die if other syscall fails' );
-
+
# make both syscalls succeed
@sysfail = (0, 0);
local $@;
$args->{IMPORTS} = { foo => 1};
$ret = ExtUtils::MM_OS2::static_lib( $args );
is( $called, 2, '... should call parent method if extra imports passed' );
- like( $ret, qr/^called static_lib\n\t\$\(AR\) \$\(AR_STATIC_ARGS\)/m,
+ like( $ret, qr/^called static_lib\n\t\$\(AR\) \$\(AR_STATIC_ARGS\)/m,
'... should append make tags to first line from parent method' );
- like( $ret, qr/\$@\n\n\nline2\nline3\n\nline4/m,
+ like( $ret, qr/\$@\n\n\nline2\nline3\n\nline4/m,
'... should include remaining data from parent method' );
}
unless (defined $dir) {
if (-d $file) {
next if ( -x $file . '.exe' or -x $file . '.cmd' );
-
+
$dir = $file;
$found++;
}
SKIP: {
skip('No appropriate directory found', 1) unless defined $dir;
- is( ExtUtils::MM_OS2->maybe_command( $dir ), undef,
+ is( ExtUtils::MM_OS2->maybe_command( $dir ), undef,
'maybe_command() should ignore directories' );
}
}
# file_name_is_absolute
-ok( ExtUtils::MM_OS2->file_name_is_absolute( 's:/' ),
+ok( ExtUtils::MM_OS2->file_name_is_absolute( 's:/' ),
'file_name_is_absolute() should be true for paths with volume and slash' );
-ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ),
+ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ),
'... and for paths with leading slash but no volume' );
-ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ),
+ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ),
'... but not for paths with no leading slash or volume' );
my $aout = 0;
local *OS2::is_aout;
*OS2::is_aout = \$aout;
-
+
$mm->init_linker;
isnt( $mm->{PERL_ARCHIVE_AFTER}, '',
'PERL_ARCHIVE_AFTER should be empty without $is_aout set' );
$aout = 1;
- is( $mm->{PERL_ARCHIVE_AFTER},
- '$(PERL_INC)/libperl_override$(LIB_EXT)',
+ is( $mm->{PERL_ARCHIVE_AFTER},
+ '$(PERL_INC)/libperl_override$(LIB_EXT)',
'... and has libperl_override if it is set' );
}
# EXPORT_LIST
-is( $mm->{EXPORT_LIST}, '$(BASEEXT).def',
+is( $mm->{EXPORT_LIST}, '$(BASEEXT).def',
'EXPORT_LIST should add .def to BASEEXT member' );
END {
}
chdir 't';
-BEGIN {
- use Test::More;
+BEGIN {
+ use Test::More;
if( $^O =~ /^VMS|os2|MacOS|MSWin32|cygwin|beos|netware$/i ) {
plan skip_all => 'Non-Unix platform';
# only one of the following can be true
# test should be removed if MM_Unix ever stops handling other OS than Unix
my $os = ($ExtUtils::MM_Unix::Is{OS2} || 0)
- + ($ExtUtils::MM_Unix::Is{Win32} || 0)
+ + ($ExtUtils::MM_Unix::Is{Win32} || 0)
+ ($ExtUtils::MM_Unix::Is{Dos} || 0)
- + ($ExtUtils::MM_Unix::Is{VMS} || 0);
+ + ($ExtUtils::MM_Unix::Is{VMS} || 0);
cmp_ok ( $os, '<=', 1, 'There can be only one (or none)');
is($ExtUtils::MM_Unix::VERSION, $ExtUtils::MakeMaker::VERSION, 'MM_Unix has a $VERSION');
is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
'catfile(xx, xx) => xx/xx');
-is ($class->file_name_is_absolute('Bombdadil'),
+is ($class->file_name_is_absolute('Bombdadil'),
File::Spec->file_name_is_absolute('Bombdadil'),
'file_name_is_absolute()');
# has_link_code tests
my $t = bless { NAME => "Foo" }, $class;
-$t->{HAS_LINK_CODE} = 1;
+$t->{HAS_LINK_CODE} = 1;
is ($t->has_link_code(),1,'has_link_code'); is ($t->{HAS_LINK_CODE},1);
$t->{HAS_LINK_CODE} = 0;
}
###############################################################################
-# replace_manpage_separator
+# replace_manpage_separator
-is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator');
+is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator');
###############################################################################
foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER /)
{
ok( exists $t->{$_}, "$_ was defined" );
- is( $t->{$_}, '', "$_ is empty on Unix");
+ is( $t->{$_}, '', "$_ is empty on Unix");
}
skip( '$ENV{COMSPEC} not set', 2 )
unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i;
my $comspec = $1;
- is( $MM->maybe_command( $comspec ),
+ is( $MM->maybe_command( $comspec ),
$comspec, 'COMSPEC is a maybe_command()' );
( my $comspec2 = $comspec ) =~ s|\..{3}$||;
- like( $MM->maybe_command( $comspec2 ),
- qr/\Q$comspec/i,
+ like( $MM->maybe_command( $comspec2 ),
+ qr/\Q$comspec/i,
'maybe_command() without extension' );
}
my $had_pathext = exists $ENV{PATHEXT};
{
local $ENV{PATHEXT} = '.exe';
- ok( ! $MM->maybe_command( 'not_a_command.com' ),
+ ok( ! $MM->maybe_command( 'not_a_command.com' ),
'not a maybe_command()' );
}
# Bug in Perl. local $ENV{FOO} won't delete the key afterward.
# file_name_is_absolute() [Does not support UNC-paths]
{
- ok( $MM->file_name_is_absolute( 'C:/' ),
+ ok( $MM->file_name_is_absolute( 'C:/' ),
'file_name_is_absolute()' );
ok( ! $MM->file_name_is_absolute( 'some/path/' ),
'not file_name_is_absolute()' );
}
-# find_perl()
+# find_perl()
# Should be able to find running perl... $^X is OK on Win32
{
my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t?
{
my @path_eg = qw( c: trick dir/now_OK );
- is( $MM->catdir( @path_eg ),
+ is( $MM->catdir( @path_eg ),
'C:\\trick\\dir\\now_OK', 'catdir()' );
- is( $MM->catdir( @path_eg ),
- File::Spec->catdir( @path_eg ),
+ is( $MM->catdir( @path_eg ),
+ File::Spec->catdir( @path_eg ),
'catdir() eq File::Spec->catdir()' );
# catfile() (calls MM_Win32->catdir)
is( $MM->catfile( @path_eg ),
'C:\\trick\\dir\\now_OK\\file.ext', 'catfile()' );
- is( $MM->catfile( @path_eg ),
- File::Spec->catfile( @path_eg ),
+ is( $MM->catfile( @path_eg ),
+ File::Spec->catfile( @path_eg ),
'catfile() eq File::Spec->catfile()' );
}
# init_* methods and check the keys in $mm_w32 directly
{
my $mm_w32 = bless {
- NAME => 'TestMM_Win32',
+ NAME => 'TestMM_Win32',
VERSION => '1.00',
PM => { 'MM_Win32.pm' => 1 },
MAKE => $Config{make},
# init_linker
{
- my $libperl = File::Spec->catfile('$(PERL_INC)',
+ my $libperl = File::Spec->catfile('$(PERL_INC)',
$Config{libperl} || 'libperl.a');
my $export = '$(BASEEXT).def';
my $after = '';
skip( "Can't write to temp file: $!", 4 )
unless close SCRIPT;
# now start tests:
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 3 )
unless rename $script_name, "${script_name}.pl";
$script_ext = '.pl';
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 2 )
unless rename "${script_name}$script_ext", "${script_name}.bat";
$script_ext = '.bat';
- is( $MM->perl_script( $script_name ),
+ is( $MM->perl_script( $script_name ),
"${script_name}$script_ext", "perl_script ($script_ext)" );
skip( "Can't rename temp file: $!", 1 )
$script_ext = '.noscript';
isnt( $MM->perl_script( $script_name ),
- "${script_name}$script_ext",
+ "${script_name}$script_ext",
"not a perl_script anymore ($script_ext)" );
is( $MM->perl_script( $script_name ), undef,
"perl_script ($script_ext) returns empty" );
chmod 0444, 'dasboot.bs';
SKIP: {
- skip("cannot write readonly files", 1) if -w 'dasboot.bs';
+ skip("cannot write readonly files", 1) if -w 'dasboot.bs';
eval{ Mkbootstrap('dasboot', 1) };
like( $@, qr/Unable to open dasboot\.bs/, 'should die given bad filename' );
local $DynaLoader::bscode;
$DynaLoader::bscode = 'Wall';
$ExtUtils::Mkbootstrap::Verbose = 0;
-
+
# if arguments contain '-l' or '-L' or '-R' print dl_findfile message
eval{ Mkbootstrap('dasboot', '-Larry') };
is( $@, '', 'should be able to open a file again');
setup;
-END {
+END {
ok( chdir File::Spec->updir );
ok( teardown );
}
use Config;
use ExtUtils::MakeMaker;
-ok( my $stdout = tie *STDOUT, 'TieOut' );
+ok( my $stdout = tie *STDOUT, 'TieOut' );
# Create a normalized MM object to test with
my $mm = bless {}, "MM";
);
like $stdout->read, qr{\Q
-Your perl and your Config.pm seem to have different ideas about the
+Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [arch1]
Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
+This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
};
diag(@mpl_out);
my $makefile = makefile_name();
-ok( grep(/^Writing $makefile for Big::Dummy/,
+ok( grep(/^Writing $makefile for Big::Dummy/,
@mpl_out) == 1,
'Makefile.PL output looks right');
my $ppd_html;
{ local $/; $ppd_html = <PPD> }
close PPD;
-like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m,
+like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m,
' <SOFTPKG>' );
like( $ppd_html,
qr{^\s*<ABSTRACT>Try "our" hot dog's, \$andwiche\$ and \$\(ub\)\$!</ABSTRACT>}m,
' <ABSTRACT>');
-like( $ppd_html,
+like( $ppd_html,
qr{^\s*<AUTHOR>Michael G Schwern <schwern\@pobox.com></AUTHOR>}m,
' <AUTHOR>' );
like( $ppd_html, qr{^\s*<IMPLEMENTATION>}m, ' <IMPLEMENTATION>');
my $test_out = run("$make test");
like( $test_out, qr/All tests successful/, 'make test' );
-is( $?, 0, ' exited normally' ) ||
+is( $?, 0, ' exited normally' ) ||
diag $test_out;
# Test 'make test TEST_VERBOSE=1'
ok( -r '../dummy-install', ' install dir created' );
my %files = ();
-find( sub {
+find( sub {
# do it case-insensitive for non-case preserving OSs
my $file = lc $_;
# VMS likes to put dots on the end of things that don't have them.
$file =~ s/\.$// if $Is_VMS;
- $files{$file} = $File::Find::name;
+ $files{$file} = $File::Find::name;
}, '../dummy-install' );
ok( $files{'dummy.pm'}, ' Dummy.pm installed' );
ok( $files{'liar.pm'}, ' Liar.pm installed' );
skip 'VMS install targets do not preserve $(DESTDIR)', 10 if $Is_VMS;
$install_out = run("$make install PREFIX= DESTDIR=other");
- is( $?, 0, 'install with DESTDIR' ) ||
+ is( $?, 0, 'install with DESTDIR' ) ||
diag $install_out;
like( $install_out, qr/^Installing /m );
ok( -d 'other', ' destdir created' );
%files = ();
my $perllocal;
- find( sub {
+ find( sub {
$files{$_} = $File::Find::name;
}, 'other' );
ok( $files{'Dummy.pm'}, ' Dummy.pm installed' );
ok( $files{'.packlist'}, ' packlist created' );
ok( $files{'perllocal.pod'},' perllocal.pod created' );
- ok( open(PERLLOCAL, $files{'perllocal.pod'} ) ) ||
+ ok( open(PERLLOCAL, $files{'perllocal.pod'} ) ) ||
diag("Can't open $files{'perllocal.pod'}: $!");
{ local $/;
unlike(<PERLLOCAL>, qr/other/, 'DESTDIR should not appear in perllocal');
close PERLLOCAL;
# TODO not available in the min version of Test::Harness we require
-# ok( open(PACKLIST, $files{'.packlist'} ) ) ||
+# ok( open(PACKLIST, $files{'.packlist'} ) ) ||
# diag("Can't open $files{'.packlist'}: $!");
# { local $/;
# local $TODO = 'DESTDIR still in .packlist';
skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS;
$install_out = run("$make install PREFIX=elsewhere DESTDIR=other/");
- is( $?, 0, 'install with PREFIX override and DESTDIR' ) ||
+ is( $?, 0, 'install with PREFIX override and DESTDIR' ) ||
diag $install_out;
like( $install_out, qr/^Installing /m );
cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out);
ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1,
- 'init_dirscan skipped distdir') ||
+ 'init_dirscan skipped distdir') ||
diag(@mpl_out);
# I know we'll get ignored errors from make here, that's ok.
my @dirs = (File::Spec->updir) x 2;
my $expected_updir = File::Spec->catdir(@dirs);
-
+
::is $mm->cd(@cd_args),
qq{cd $dir
command1
command2
cd $expected_updir};
}
-
+
{
local *make = sub { "dmake" };
SKIP: {
skip("VMS' cd requires vmspath which is only on VMS", 1) unless $Is_VMS;
-
+
use ExtUtils::MM_VMS;
is +ExtUtils::MM_VMS->cd(@cd_args),
q{startdir = F$Environment("Default")
my @lines = @_;
unlike $lines[$shb_line_num], qr[/foo/bar/perl], "#! replaced";
like $lines[$shb_line_num], qr[ -w\b], "switch retained";
-
+
# In between might be that "not running under some shell" madness.
-
+
is $lines[-1], "blah blah blah\n", "Program text retained";
}
);
return 1;
}
-sub teardown_recurs {
+sub teardown_recurs {
foreach my $file (keys %Files) {
my $dir = dirname($file);
if( -e $dir ) {
return 1;
}
-sub teardown {
+sub teardown {
foreach my $file (keys %Files) {
my $dir = dirname($file);
if( -e $dir ) {
return 1;
}
-sub teardown_recurs {
+sub teardown_recurs {
foreach my $file (keys %Files) {
my $dir = dirname($file);
if( -e $dir ) {
return 1;
}
-sub teardown_recurs {
+sub teardown_recurs {
foreach my $file (keys %Files) {
my $dir = dirname($file);
if( -e $dir ) {
CODE:
RETVAL = (input % 2 == 0);
OUTPUT:
- RETVAL
+ RETVAL
END
'XS-Test/t/is_even.t' => <<'END',
return 1;
}
-sub teardown_xs {
+sub teardown_xs {
foreach my $file (keys %Files) {
my $dir = dirname($file);
if( -e $dir ) {
# When building in the core, *don't* go off and find
# another perl
- die "Can't find a perl to use (\$^X=$^X), (\$perlpath=$perlpath)"
+ die "Can't find a perl to use (\$^X=$^X), (\$perlpath=$perlpath)"
if $ENV{PERL_CORE};
foreach my $path (File::Spec->path) {
unshift @INC, $lib;
}
-END {
+END {
if( $had5lib ) {
$ENV{PERL5LIB} = $old5lib;
}
sub makefile_name {
return $Is_VMS ? 'Descrip.MMS' : 'Makefile';
-}
+}
=item B<makefile_backup>
Returns the command necessary to run $make on the given $target using
the given %macros.
- my $make_test_verbose = make_macro(make_run(), 'test',
+ my $make_test_verbose = make_macro(make_run(), 'test',
TEST_VERBOSE => 1);
This is important because VMS's make utilities have a completely
use ExtUtils::MM;
- # Unix, modern Windows and OS/2 from 5.005_54 up can handle 2>&1
+ # Unix, modern Windows and OS/2 from 5.005_54 up can handle 2>&1
# This makes our failure diagnostics nicer to read.
if( MM->os_flavor_is('Unix') or
(MM->os_flavor_is('Win32') and !MM->os_flavor_is('Win9x')) or
=item B<setup_mm_test_root>
-Creates a rooted logical to avoid the 8-level limit on older VMS systems.
+Creates a rooted logical to avoid the 8-level limit on older VMS systems.
No action taken on non-VMS systems.
=cut
# imposed by RMS. We get around this with a rooted logical, but we
# can't create logical names with attributes in Perl, so we do it
# in a DCL subprocess and put it in the job table so the parent sees it.
- open( MMTMP, '>mmtesttmp.com' ) ||
+ open( MMTMP, '>mmtesttmp.com' ) ||
die "Error creating command file; $!";
print MMTMP <<'COMMAND';
$ MM_TEST_ROOT = F$PARSE("SYS$DISK:[--]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
sub test_filter {
my($text, $vms_text) = @_;
-
+
local $Test::Builder::Level = $Test::Builder::Level + 1;
is( ExtUtils::MM_Any->maketext_filter($text), $text, 'default filter' );
is( ExtUtils::MM_VMS->maketext_filter($text), $vms_text, 'VMS filter' );
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
};
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
}, 'rt.cpan.org 39348';
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
};
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
};
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
},'CONFIGURE_REQUIRES';
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
},'CONFIGURE_REQUIRES';
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
},'META.yml data (META_ADD wins)';
{
- my @meta = (
+ my @meta = (
name => 'My-Module',
version => '0.1',
version_from => 'lib/My/Module.pm',
}
{
- my @meta = (
+ my @meta = (
name => 'My-Module',
version => '0.1',
version_from => 'lib/My/Module.pm',
}
{
- my @meta = (
+ my @meta = (
name => 'My-Module',
version => '0.1',
version_from => 'lib/My/Module.pm',
SKIP: {
- # Load() behaves diffrently in versions prior to 1.06
+ # Load() behaves diffrently in versions prior to 1.06
skip "Need YAML::Tiny to test if it can load META.yml", 2
unless eval { require YAML::Tiny } and $YAML::Tiny::VERSION >= 1.06;
my @meta = ( k => \*STDOUT );
eval { $mm->metafile_file(@meta) };
- like($@, qr/^only nested hashes, arrays and objects are supported/,
+ like($@, qr/^only nested hashes, arrays and objects are supported/,
"we don't like but hash/array refs");
}
my @meta = ( k => [ [] ] );
eval { $mm->metafile_file(@meta) };
- like($@, qr/^only nested arrays of non-refs are supported/,
+ like($@, qr/^only nested arrays of non-refs are supported/,
"we also don't like but array of strings");
}
BEGIN {
plan skip_all => "miniperl test only necessary for the perl core"
if !$ENV{PERL_CORE};
-
+
plan "no_plan";
}
my $Has_Version = eval 'require version; "version"->import; 1';
+# "undef" - means we expect "undef", undef - eval should be never called for this string
my %versions = (q[$VERSION = '1.00'] => '1.00',
q[*VERSION = \'1.01'] => '1.01',
q[($VERSION) = q$Revision: 32208 $ =~ /(\d+)/g;] => 32208,
'$VERSION = 0.0' => 0.0,
'$VERSION = -1.0' => -1.0,
'$VERSION = undef' => 'undef',
- '$wibble = 1.0' => 'undef',
+ '$wibble = 1.0' => undef,
q[my $VERSION = '1.01'] => 'undef',
q[local $VERISON = '1.02'] => 'undef',
q[local $FOO::VERSION = '1.30'] => 'undef',
q[if( $Foo::VERSION >= 3.00 ) {]=> 'undef',
q[our $VERSION = '1.23';] => '1.23',
+ q[$CGI::VERSION='3.63'] => '3.63',
+ q[$VERSION = "1.627"; # ==> ALSO update the version in the pod text below!] => '1.627',
- '$Something::VERSION == 1.0' => 'undef',
- '$Something::VERSION <= 1.0' => 'undef',
- '$Something::VERSION >= 1.0' => 'undef',
- '$Something::VERSION != 1.0' => 'undef',
+ '$Something::VERSION == 1.0' => undef,
+ '$Something::VERSION <= 1.0' => undef,
+ '$Something::VERSION >= 1.0' => undef,
+ '$Something::VERSION != 1.0' => undef,
+ 'my $meta_coder = ($JSON::XS::VERSION >= 1.4) ?' => undef,
qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n] => '2.3',
qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n\$VERSION = 4.5\n] => '2.3',
'$VERSION = sprintf("%d.%03d", q$Revision: 3.74 $ =~ /(\d+)\.(\d+)/);' => '3.074',
'$VERSION = substr(q$Revision: 2.8 $, 10) + 2 . "";' => '4.8',
- 'elsif ( $Something::VERSION >= 1.99 )' => 'undef',
+ q[our $VERSION = do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };] => '2.07', # Fucking seriously?
+ 'elsif ( $Something::VERSION >= 1.99 )' => undef,
);
if( $Has_Version ) {
$versions{q[use version; $VERSION = qv("1.2.3");]} = qv("1.2.3");
$versions{q[$VERSION = qv("1.2.3")]} = qv("1.2.3");
+ $versions{q[$VERSION = v1.2.3]} = 'v1.2.3';
}
if( $] >= 5.011001 ) {
END
}
-plan tests => (3 * keys %versions) + 4;
+plan tests => (3 * keys %versions) + 4 + grep { !defined} (values %versions);
for my $code ( sort keys %versions ) {
my $expect = $versions{$code};
(my $label = $code) =~ s/\n/\\n/g;
my $warnings = "";
local $SIG{__WARN__} = sub { $warnings .= "@_\n"; };
- is( parse_version_string($code), $expect, $label );
+ if (defined $expect) {
+ is( parse_version_string($code), $expect, $label );
+ } else {
+ my $is_called = 0;
+ no warnings qw[redefine once];
+ local *MM::get_version = sub {
+ $is_called = 1;
+ };
+ ok !$is_called;
+ is( parse_version_string($code), 'undef', $label );
+ }
is($warnings, '', "$label does not cause warnings");
}
sub MY::postamble {
my($self, %extra) = @_;
- is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
+ is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
'postamble args passed' );
return <<OUT;
ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!";
-{ local $/;
+{ local $/;
like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
'postamble added to the Makefile' );
}
strict => 99999
}
);
- is $warnings,
+ is $warnings,
sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
$strict::VERSION);
"I::Do::Not::Exist" => 0,
}
);
- is $warnings,
+ is $warnings,
"Warning: prerequisite I::Do::Not::Exist 0 not found.\n";
"strict" => 99999,
}
);
- is $warnings,
+ is $warnings,
"Warning: prerequisite I::Do::Not::Exist 0 not found.\n".
sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
$strict::VERSION);
-
+
$warnings = '';
eval {
WriteMakefile(
PREREQ_FATAL => 1,
);
};
-
+
is $warnings, '';
is $@, <<'END', "PREREQ_FATAL";
MakeMaker FATAL: prerequisites not found.
PREREQ_FATAL => 1,
);
};
-
+
is $warnings, '';
is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE";
MakeMaker FATAL: prerequisites not found.
$prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"});
ok( !-r $Makefile, "PRINT_PREREQ produces no $Makefile" );
is( $?, 0, ' exited normally' );
-::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x,
+::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x,
'prereqs dumped' );
eval { $MM->eval_in_subdirs; };
is( $stdout->read, qq{\@INC has .\n}, 'cwd in @INC' );
- like( $@,
+ like( $@,
qr{^ERROR from evaluation of .*subdir.*Makefile.PL: YYYAaaaakkk},
'Makefile.PL death in subdir warns' );
eval {
prompt(undef);
};
-like( $@, qr/^prompt function called without an argument/,
+like( $@, qr/^prompt function called without an argument/,
'undef message' );
my $stdout = tie *STDOUT, 'TieOut' or die;
$| = 1;
ok( setup_recurs(), 'setup' );
-END {
+END {
ok( chdir File::Spec->updir );
ok( teardown_recurs(), 'teardown' );
}
my $inst_script = File::Spec->catdir(File::Spec->updir, 'cgi');
ok( open(MAKEFILE, $submakefile) ) || diag("Can't open $submakefile: $!");
-{ local $/;
- like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m,
- 'prepend .. not stomping WriteMakefile args' )
+{ local $/;
+ like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m,
+ 'prepend .. not stomping WriteMakefile args' )
}
close MAKEFILE;
use Test::More tests => 4;
-BEGIN {
- use_ok 'ExtUtils::MakeMaker';
+BEGIN {
+ use_ok 'ExtUtils::MakeMaker';
use_ok 'ExtUtils::MM_VMS';
}
eval {
WriteMakefile(
NAME => 'Multiple::Authors',
- CONFIGURE => sub {
+ CONFIGURE => sub {
return {AUTHOR => 'John Doe <jd@example.com>',};
},
);
use Test::More tests => 5;
-BEGIN {
+BEGIN {
# non-core tests will have blib in their path. We remove it
# and just use the one in lib/.
unless( $ENV{PERL_CORE} ) {
};
is( $warnings, '' );
is_deeply( $mm->{AUTHOR}, ["test"] );
-
+
# AUTHOR / array
$warnings = '';
};
is( $warnings, '' );
is_deeply( $mm->{AUTHOR}, ["test1","test2"] );
-
+
}
my $make = make_run();
my $make_out = run("$make");
-is( $?, 0, ' make exited normally' ) ||
+is( $?, 0, ' make exited normally' ) ||
diag $make_out;
my $test_out = run("$make test");
-is( $?, 0, ' make test exited normally' ) ||
+is( $?, 0, ' make test exited normally' ) ||
diag $test_out;