lib/ExtUtils/t/eu_command.t See if ExtUtils::Command works
lib/ExtUtils/t/FIRST_MAKEFILE.t See if FIRST_MAKEFILE works
lib/ExtUtils/t/fixin.t See if ExtUtils::MakeMaker works
+lib/ExtUtils/t/fix_libs.t Test for ExtUtils::MakeMaker
lib/ExtUtils/t/hints.t See if hint files are honored.
lib/ExtUtils/t/Installapi2.t See if new api for ExtUtils::Install::install() works
lib/ExtUtils/t/INSTALL_BASE.t Test INSTALL_BASE in MakeMaker
lib/ExtUtils/t/Install.t See if ExtUtils::Install works
lib/ExtUtils/t/INST_PREFIX.t See if MakeMaker can apply PREFIXs
lib/ExtUtils/t/INST.t Check MakeMaker INST_* macros
+lib/ExtUtils/t/is_of_type.t Test for ExtUtils::MakeMaker
lib/ExtUtils/t/Liblist.t See if ExtUtils::Liblist works
lib/ExtUtils/t/make.t See if make detection works
lib/ExtUtils/t/maketext_filter.t See if maketext_filter works
lib/ExtUtils/t/metafile_data.t See if META.yml handling works
lib/ExtUtils/t/metafile_file.t See if META.yml handling works
lib/ExtUtils/t/min_perl_version.t Test the MIN_PERL_VERSION argument to WriteMakefile.
+lib/ExtUtils/t/miniperl.t Test MakeMaker with miniperl
lib/ExtUtils/t/Mkbootstrap.t See if ExtUtils::Mkbootstrap works
lib/ExtUtils/t/MM_Any.t See if ExtUtils::MM_Any works
lib/ExtUtils/t/MM_BeOS.t See if ExtUtils::MM_BeOS works
lib/ExtUtils/t/parse_version.t See if parse_version works
lib/ExtUtils/t/PL_FILES.t Test PL_FILES in MakeMaker
lib/ExtUtils/t/pm.t See if MakeMaker can handle PM
+lib/ExtUtils/t/pm_to_blib.t Test for ExtUtils::MakeMaker
lib/ExtUtils/t/pod2man.t See if MakeMaker can handle no pod2man
lib/ExtUtils/t/postamble.t See if postamble works
lib/ExtUtils/t/prefixify.t See if MakeMaker can apply a PREFIX
t/lib/locale/utf8 Part of locale.t in UTF8
t/lib/MakeMaker/Test/Setup/BFD.pm MakeMaker test utilities
t/lib/MakeMaker/Test/Setup/MPV.pm MakeMaker test utilities
+t/lib/MakeMaker/Test/NoXS.pm MakeMaker test utilities
t/lib/MakeMaker/Test/Setup/PL_FILES.pm MakeMaker test utilities
t/lib/MakeMaker/Test/Setup/Problem.pm MakeMaker test utilities
t/lib/MakeMaker/Test/Setup/Recurs.pm MakeMaker test utilities
+6.53_02 Sun Jun 7 19:24:56 PDT 2009
+ Test Fixes
+ * Stray use of Shell::Command broke older perls
+
+ Other
+ * MakeMaker will now automatically test itself with multiple
+ perl versions before releasing.
+
+
+6.53_01 Sun Jun 7 19:02:20 PDT 2009
+ Bug Fixes
+ * blib will now be rebuilt if the Makefile is changed
+ [rt.cpan.org 46658]
+ * 6.52 broke the setting of EXTRALIBS, LDLOADLIBS and BSLOADLIBS
+ when $self->{LIBS}[0] is undefined.
+ [rt.cpan.org 46633] (Craig Berry)
+
+ Cygwin
+ * Fixed MM_Cygwin.t when the path prefix (ie. cygdrive) has been
+ changed by the user. [rt.cpan.org 46585] (JDHEDDEN)
+
+ VMS
+ * Removed attempts to compensate for the "bin" logical added
+ by some versions of GNV, Craig says they're futile.
+ Put a warning into the Makefile.PL instead.
+ [rt.cpan.org 46679] (Craig Berry)
+ * Removed the arch_check() special case for VMS.
+ [rt.cpan.org 46678] (Craig Berry)
+
+ Win32
+ * Restore building the core by not trying to load the Win32
+ module in arch_check() with miniperl.
+ [rt.cpan.org 46667] (Max Maischein)
+
+ Tests
+ * Forgot to get rid of the tests for bytes and vmsish
+ which were removed in 6.51_01.
+ * Stopped running a Windows specific arch_check.t test
+ on non-Windows. (Craig Berry)
+ [rt.cpan.org 46678]
+
+
6.52 Sat May 30 11:22:04 PDT 2009
Docs
* Documented CONFIGURE_REQUIRES (Alexandr Ciornii)
- * Modnerized the docs for PREREQ_PM
+ * Modernized the docs for PREREQ_PM
6.51_04 Sun May 24 14:04:11 PDT 2009
our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
warn_if_old_packlist);
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
my $Is_VMS = $^O eq 'VMS';
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
use File::Spec;
require ExtUtils::Liblist::Kid;
# Broken out of MakeMaker from version 4.11
use strict;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
use Config;
use Cwd 'cwd';
use strict;
use ExtUtils::MakeMaker::Config;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::Liblist;
require ExtUtils::MakeMaker;
package ExtUtils::MM_AIX;
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_Any;
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
use Carp;
use File::Spec;
}
+=head3 can_load_xs
+
+ my $can_load_xs = $self->can_load_xs;
+
+Returns true if we have the ability to load XS.
+
+This is important because miniperl, used to build XS modules in the
+core, can not load XS.
+
+=cut
+
+sub can_load_xs {
+ return defined &DynaLoader::boot_DynaLoader ? 1 : 0;
+}
+
+
=head3 split_command
my @cmds = $MM->split_command($cmd, @args);
$self->{LD_RUN_PATH} = "";
- # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
- # Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
- # undefined. In any case we turn it into an anon array:
-
- # May check $Config{libs} too, thus not empty.
- $self->{LIBS} = [$self->{LIBS}] unless ref $self->{LIBS};
-
- $self->{LIBS} = [''] unless @{$self->{LIBS}} && defined $self->{LIBS}[0];
+ $self->{LIBS} = $self->_fix_libs($self->{LIBS});
+ # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
foreach my $libs ( @{$self->{LIBS}} ){
$libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
my(@libs) = $self->extliblist($libs);
}
+# Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
+# undefined. In any case we turn it into an anon array
+sub _fix_libs {
+ my($self, $libs) = @_;
+
+ return !defined $libs ? [''] :
+ !ref $libs ? [$libs] :
+ !defined $libs->[0] ? [''] :
+ $libs ;
+}
+
+
=head3 tools_other
my $make_frag = $MM->tools_other;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
=item os_flavor
require ExtUtils::MM_Win32;
our @ISA = qw( ExtUtils::MM_Unix );
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
=head1 NAME
use strict;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Unix );
}
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
=head1 NAME
use strict;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
sub new {
die <<'UNSUPPORTED';
use ExtUtils::MakeMaker::Config;
use File::Basename;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
use ExtUtils::MakeMaker qw(neatvalue);
use File::Spec;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
package ExtUtils::MM_QNX;
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_UWIN;
use strict;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
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.52';
+$VERSION = '6.53_02';
require ExtUtils::MM_Any;
our @ISA = qw(ExtUtils::MM_Any);
my $self = shift;
my($autodir) = $self->catdir('$(INST_LIB)','auto');
my $r = q{
-pm_to_blib : $(TO_INST_PM)
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
};
# VMS will swallow '' and PM_FILTER is often empty. So use q[]
use File::Basename;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
}
-=item arch_check (override)
-
-vmsify all arguments for consistency
-
-=cut
-
-sub arch_check {
- my $self = shift;
-
- return $self->SUPER::arch_check(map { vmsify($_) } @_);
-}
-
-
# --- Output postprocessing section ---
=item maketext_filter (override)
package ExtUtils::MM_VOS;
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
$ENV{EMXSHELL} = 'sh'; # to run `commands`
sub arch_check {
my $self = shift;
+ # Win32 is an XS module, minperl won't have it.
+ # arch_check() is not critical, so just fake it.
+ return 1 unless $self->can_load_xs;
+
require Win32;
return $self->SUPER::arch_check( map { lc Win32::GetShortPathName($_) } @_);
}
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
use strict;
require ExtUtils::MM;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
our @ISA = qw(ExtUtils::MM);
{
my @Prepend_parent;
my %Recognized_Att_Keys;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
# Emulate something resembling CVS $Revision$
(our $Revision = $VERSION) =~ s{_}{};
my @sigs = ref $sig ? @$sig : $sig;
my $given = ref $val;
- unless( grep { $given eq $_ || ($_ && eval{$val->isa($_)}) } @sigs ) {
+ unless( grep { _is_of_type($val, $_) } @sigs ) {
my $takes = join " or ", map { _format_att($_) } @sigs;
my $has = _format_att($given);
}
+# Check if a given thing is a reference or instance of $type
+sub _is_of_type {
+ my($thing, $type) = @_;
+
+ return 1 if ref $thing eq $type;
+
+ local $SIG{__DIE__};
+ return 1 if eval{ $thing->isa($type) };
+
+ return 0;
+}
+
+
sub _format_att {
my $given = shift;
use strict;
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
use Config ();
# There's just too much Dynaloader incest here to turn on strict vars.
use strict 'refs';
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
require Exporter;
our @ISA = ('Exporter');
our @ISA = qw(Exporter);
our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.52';
+our $VERSION = '6.53_02';
sub Mksymlists {
my(%spec) = @_;
SKIP: {
my $comspec = $ENV{COMSPEC};
+ skip(q[$ENV{COMSPEC} does not exist], 1) unless $comspec;
- skip("\$ENV{COMSPEC} does not exist", 3) unless $comspec;
+ $comspec = Cygwin::win_to_posix_path($comspec);
- # Convert into cygwin-flavoured '/cygdrive/c/...' path.
- # Is there a better way than direct munging? A File::*
- # module perhaps?
-
- $comspec =~ s{^(\w):} {/cygdrive/\l$1}x;
- $comspec =~ s{\\ } {/}gx;
-
- ok(MM->maybe_command($comspec),"$comspec should be executable");
-
- # /cygdrive/c should *never* be executable, it's a directory.
+ ok MM->maybe_command($comspec), qq{'$comspec' should be executable"};
+}
- ok(! MM->maybe_command(q{/cygdrive/c}),
- qq{/cygdrive/c should never be executable}
- );
+# 'C:/' should *never* be executable, it's a directory.
+{
+ my $cdrive = Cygwin::win_to_posix_path("C:/");
- # Our copy of Perl (with a unix-path) should always be executable.
+ ok !MM->maybe_command($cdrive), qq{'$cdrive' should never be executable};
+}
- ok(MM->maybe_command($Config{perlpath}),
- qq{$Config{perlpath} should be executable}
- );
+# Our copy of Perl (with a unix-path) should always be executable.
+ok MM->maybe_command($Config{perlpath}), qq{'$Config{perlpath}' should be executable};
-}
package FakeOut;
#!/usr/bin/perl -w
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib lib);
- }
-}
-
use strict;
use lib 't/lib';
# Different file path separators [rt.cpan.org 46416]
SKIP: {
- skip "Can't load File::Spec::Win32" unless eval "require File::Spec::Win32";
- local @File::Spec::ISA = qw(File::Spec::Win32);
+ require File::Spec;
+ skip "Win32 test", 1 unless File::Spec->isa("File::Spec::Win32");
+
ok $mm->arch_check(
"/_64/perl1004/lib/Config.pm",
'\\_64\\perl1004\\lib\\Config.pm',
# PERL_SRC is set, no check is done
{
+ # Clear our log
+ $stdout->read;
+
local $mm->{PERL_SRC} = 1;
ok $mm->arch_check(
$rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
use File::Spec;
use File::Path;
-# 'make disttest' sets a bunch of environment variables which interfere
-# with our testing.
-delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
-
my $perl = which_perl();
my $Is_VMS = $^O eq 'VMS';
-# GNV logical interferes with testing
-local $ENV{'bin'} = '[.bin]' if $Is_VMS;
-
chdir 't';
perl_lib;
--- /dev/null
+#!/usr/bin/perl -w
+
+# Unit test the code which fixes up $self->{LIBS}
+
+use strict;
+use lib 't/lib';
+use Test::More 'no_plan';
+
+use ExtUtils::MakeMaker;
+
+my @tests = (
+ # arg # want
+ [ undef, [''] ],
+ [ "foo", ['foo'] ],
+ [ [], [''] ],
+ [ ["foo"], ['foo'] ],
+ [ [1, 2, 3], [1, 2, 3] ],
+ [ [0], [0] ],
+ [ [''], [''] ],
+ [ " ", [' '] ],
+);
+
+for my $test (@tests) {
+ my($arg, $want) = @$test;
+
+ my $display = defined $arg ? $arg : "undef";
+ is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" );
+}
--- /dev/null
+#!/usr/bin/perl -w
+
+# Test _is_of_type()
+
+use strict;
+use ExtUtils::MakeMaker;
+
+use Test::More "no_plan";
+
+my $is_of_type = \&ExtUtils::MakeMaker::_is_of_type;
+
+my @tests = (
+ [23, "", 1],
+ [[], "", 0],
+ [{}, "", 0],
+ [[], "HASH", 0],
+ [{}, "HASH", 1],
+ [bless({}, "Foo"), "Foo", 1],
+ [bless({}, "Bar"), "Foo", 0],
+ [bless([], "Foo"), "", 0],
+ [bless([], "Foo"), "HASH", 0],
+ [bless([], "Foo"), "ARRAY", 1],
+);
+
+for my $test (@tests) {
+ my($thing, $type, $want) = @$test;
+
+ # [rt.cpan.org 41060]
+ local $SIG{__DIE__} = sub { fail("sigdie should be ignored") };
+ is !!$is_of_type->($thing, $type), !!$want, qq[_is_of_type($thing, '$type'): $want];
+}
--- /dev/null
+#!/usr/bin/perl -w
+
+# Test that we can build modules as miniperl.
+# This mostly means no XS modules.
+
+use strict;
+use lib 't/lib';
+
+use Test::More 'no_plan';
+
+BEGIN {
+ ok !$INC{"ExtUtils/MakeMaker.pm"}, "MakeMaker is not yet loaded";
+}
+
+# Disable all XS from here on
+use MakeMaker::Test::NoXS;
+
+use ExtUtils::MakeMaker;
+
+use MakeMaker::Test::Utils;
+use MakeMaker::Test::Setup::BFD;
+
+
+my $perl = which_perl();
+my $makefile = makefile_name();
+my $make = make_run();
+
+
+# Setup our test environment
+{
+ chdir 't';
+
+ perl_lib;
+
+ ok( setup_recurs(), 'setup' );
+ END {
+ ok( chdir File::Spec->updir );
+ ok( teardown_recurs(), 'teardown' );
+ }
+
+ ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
+ diag("chdir failed: $!");
+}
+
+
+# Run make once
+{
+ run_ok(qq{$perl Makefile.PL});
+ run_ok($make);
+}
--- /dev/null
+#!/usr/bin/perl -w
+
+# Ensure pm_to_blib runs at the right times.
+
+use strict;
+use lib 't/lib';
+
+use Test::More 'no_plan';
+
+use ExtUtils::MakeMaker;
+
+use MakeMaker::Test::Utils;
+use MakeMaker::Test::Setup::BFD;
+
+
+my $perl = which_perl();
+my $makefile = makefile_name();
+my $make = make_run();
+
+
+# Setup our test environment
+{
+ chdir 't';
+
+ perl_lib;
+
+ ok( setup_recurs(), 'setup' );
+ END {
+ ok( chdir File::Spec->updir );
+ ok( teardown_recurs(), 'teardown' );
+ }
+
+ ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
+ diag("chdir failed: $!");
+}
+
+
+# Run make once
+{
+ run_ok(qq{$perl Makefile.PL});
+ run_ok($make);
+
+ ok( -e "blib/lib/Big/Dummy.pm", "blib copied pm file" );
+}
+
+
+# Change a pm file, it should be copied.
+{
+ # Wait a couple seconds else our changed file will have the same timestamp
+ # as the blib file
+ sleep 2;
+
+ ok( open my $fh, ">>", "lib/Big/Dummy.pm" ) or die $!;
+ print $fh "Something else\n";
+ close $fh;
+
+ run_ok($make);
+ like slurp("blib/lib/Big/Dummy.pm"), qr/Something else\n$/;
+}
+
+
+# Rerun the Makefile.PL, pm_to_blib should rerun
+{
+ run_ok(qq{$perl Makefile.PL});
+
+ # XXX This is a fragile way to check that it reran.
+ like run_ok($make), qr/^Skip /ms;
+
+ ok( -e "blib/lib/Big/Dummy.pm", "blib copied pm file" );
+}
#!/usr/bin/perl -w
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib);
- }
-}
-
# Test our simulation of pod2man
use strict;
my $Is_VMS = $^O eq 'VMS';
my $perl = which_perl();
-# GNV logical interferes with testing
-$ENV{'bin'} = '[.bin]' if $Is_VMS;
-
chdir 't';
perl_lib;
use strict;
use warnings;
-our $VERSION = 6.52;
+our $VERSION = 6.53_02;
use Cwd;
use File::Spec;
--- /dev/null
+package MakeMaker::Test::NoXS;
+
+# Disable all XS loading.
+
+use Carp;
+
+require DynaLoader;
+require XSLoader;
+
+no warnings 'redefine';
+*DynaLoader::bootstrap = sub { confess "Tried to load XS for @_"; };
+*XSLoader::load = sub { confess "Tried to load XS for @_"; };
+
+1;
require Exporter;
our @ISA = qw(Exporter);
-our $VERSION = 0.04;
-
our $Is_VMS = $^O eq 'VMS';
our $Is_MacOS = $^O eq 'MacOS';
setup_mm_test_root
have_compiler slurp
$Is_VMS $Is_MacOS
+ run_ok
);
HARNESS_TIMER
HARNESS_OPTIONS
HARNESS_VERBOSE
+ PREFIX
+ LIB
+ MAKEFLAGS
);
# Remember the ENV values because on VMS %ENV is global
}
}
+
+=item B<run_ok>
+
+ my @out = run_ok($cmd);
+
+Like run() but it tests that the result exited normally.
+
+The output from run() will be used as a diagnostic if it fails.
+
+=cut
+
+sub run_ok {
+ my $tb = Test::Builder->new;
+
+ my @out = run(@_);
+
+ $tb->cmp_ok( $?, '==', 0, "run(@_)" ) || $tb->diag(@out);
+
+ return wantarray ? @out : join "", @out;
+}
+
=item B<setup_mm_test_root>
Creates a rooted logical to avoid the 8-level limit on older VMS systems.