'Module::Build' =>
{
'MAINTAINER' => 'kwilliams',
- 'DISTRIBUTION' => 'DAGOLDEN/Module-Build-0.36.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/Module-Build-0.3603.tar.gz',
'FILES' => q[cpan/Module-Build],
'EXCLUDED' => [ qw{ t/par.t t/signature.t },
qr!^contrib/!, qr!^devtools! ],
Revision history for Perl extension Module::Build.
+0.3603 - Mon Jan 18 22:28:59 EST 2010
+
+(Oops, I released the last one before I realized this should have been
+fixed along with it.)
+
+ Bug fixes:
+
+ - Module::Build::Compat would croak on distibutions that set requires
+ 'perl' to a dotted decimal like '5.6.2'. We now skip that key
+ since it doesn't go into PREREQ_PM and we numify it properly for
+ 'use 5.006002' in the generated Makefile.PL (RT#53409)
+ [David Golden, adapted from patch by G. Allen Morris III]
+
+0.3602 - Mon Jan 18 22:09:54 EST 2010
+
+ Bug fixes:
+
+ - Fix failures in t/properties/needs_compiler.t when $ENV{CC} is set
+ (RT#53296) [David Golden, adapted from patch by Jens Rehsack]
+
+0.3601 - Mon Dec 21 14:39:33 EST 2009
+
+ Bug fixes:
+
+ - When the currently running Module::Build is not the same as the one
+ that created the Build file, there is now a warning rather than a fatal
+ error. This helps installation of dependency chains where a dependency
+ might configure_requires a new Module::Build after Build.PL was already
+ run for an earlier distribution. [David Golden, on advice of Matt Trout]
+
+ Other:
+
+ - t/bundle_inc.t fails in odd ways. This test of an experimental feature
+ should not prevent users from installing Module::Build, so this test
+ now skips unless $ENV{MB_TEST_EXPERIMENTAL} is true
+
0.36 - Sun Dec 20 15:02:38 EST 2009
No changes from 0.35_15 other than the version number.
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
Suppresses the check upon startup that the version of Module::Build
we're now running under is the same version that was initially invoked
when building the distribution (i.e. when the C<Build.PL> script was
-first run). Use with caution.
+first run). As of 0.3601, a mismatch results in a warning instead of
+a fatal error, so this option effectively just suppresses the warning.
=item debug
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
BEGIN { require 5.00503 }
unless ($self->allow_mb_mismatch) {
my $mb_version = $Module::Build::VERSION;
- die(" * ERROR: Configuration was initially created with Module::Build version '$self->{properties}{mb_version}',\n".
- " but we are now using version '$mb_version'. Please re-run the Build.PL or Makefile.PL script,\n".
- " or use --allow_mb_mismatch 1 to skip this version check.\n")
- if $mb_version ne $self->{properties}{mb_version};
+ if ( $mb_version ne $self->{properties}{mb_version} ) {
+ $self->log_warn(<<"MISMATCH");
+* WARNING: Configuration was initially created with Module::Build
+ version '$self->{properties}{mb_version}' but we are now using version '$mb_version'.
+ If errors occur, you must re-run the Build.PL or Makefile.PL script.
+MISMATCH
+ }
}
$self->{invoked_action} = $self->{action} ||= 'build';
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
use File::Basename ();
use File::Spec;
use Config;
use Module::Build;
use Module::Build::ModuleInfo;
+use Module::Build::Version;
use Data::Dumper;
my %convert_installdirs = (
# validate formats
for my $p ( $req, $breq ) {
for my $k (keys %$p) {
+ next if $k eq 'perl';
die "Prereq '$p->{$k}' for '$k' is not supported by Module::Build::Compat\n"
unless _simple_prereq($p->{$k});
}
# Makefile.PL
my $requires = $build->requires;
if ( my $minimum_perl = $requires->{perl} ) {
- print {$fh} "require $minimum_perl;\n";
+ my $min_ver = Module::Build::Version->new($minimum_perl)->numify;
+ print {$fh} "require $min_ver;\n";
}
# If a *bundled* custom subclass is being used, make sure we add its
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Config;
package Module::Build::Cookbook;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
=head1 NAME
package Module::Build::Dumper;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
# This is just a split-out of a wrapper function to do Data::Dumper
# stuff "the right way". See:
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use File::Spec;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Data::Dumper;
use IO::File;
use vars qw($VERSION);
use IO::File;
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
# This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use vars qw(@ISA);
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use vars qw(@ISA);
package inc::latest;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use Carp;
package inc::latest::private;
use strict;
use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
$VERSION = eval $VERSION;
use File::Spec;
is $mb->args('dee'), 'goo';
is $mb->destdir, 'yo';
my %runtime = $mb->runtime_params;
- is_deeply \%runtime,
+ is_deeply \%runtime,
{
verbose => 1,
destdir => 'yo',
if ( $ENV{PERL_CORE} ) {
plan skip_all => 'bundle_inc tests will never succeed in PERL_CORE';
}
+elsif ( ! $ENV{MB_TEST_EXPERIMENTAL} ) {
+ plan skip_all => '$ENV{MB_TEST_EXPERIMENTAL} is not set';
+}
elsif ( ! MBTest::check_EUI() ) {
plan skip_all => 'ExtUtils::Installed takes too long on your system';
}
# Test with requires and PL_files
my $distname = $dist->name;
-$dist->change_build_pl({
+$dist->change_build_pl({
module_name => $distname,
license => 'perl',
requires => {
######################
-$dist->change_build_pl({
+$dist->change_build_pl({
module_name => $distname,
license => 'perl',
});
});
foreach my $style ('passthrough', 'small') {
create_makefile_pl($style, $foo_builder);
-
+
# Should fail with "can't find Foo/Builder.pm"
my $result;
my ($stdout, $stderr ) = stdout_stderr_of (sub {
ok ! $result, "Makefile.PL failed";
like $stderr, qr{Foo/Builder.pm}, "custom builder wasn't found";
}
-
+
# Now make sure it can actually work.
my $bar_builder;
stdout_stderr_of( sub {
if ExtUtils::Install->VERSION < 1.32;
for my $c (@cases) {
- my @make_args = @{$c->{args}};
+ my @make_args = @{$c->{args}};
if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax.
$make_args[0] = '/macro=("' . join('","',@make_args) . '")';
pop @make_args while scalar(@make_args) > 1;
my $b2 = Module::Build->current;
ok $b2->install_base, "install_base set";
unlike $b2->install_base, qr/^~/, "Tildes should be expanded";
-
+
stdout_stderr_of( sub { $mb->do_system(@make, 'realclean'); } );
ok ! -e $makefile, "$makefile shouldn't exist";
$opts{PL_files} ||= {};
foreach my $type (@makefile_types) {
- # Create M::B instance
+ # Create M::B instance
my $mb;
stdout_stderr_of( sub {
$mb = Module::Build->new_from_context;
test_makefile_creation($mb);
test_makefile_prereq_pm( _merge_prereqs($opts{requires}, $opts{build_requires}) );
test_makefile_pl_files( $opts{PL_files} ) if $type eq 'traditional';
-
+
my ($output,$success);
# Capture output to keep our STDOUT clean
$output = stdout_stderr_of( sub {
});
ok $success, "make test ran without error";
like uc $output, qr{DONE\.|SUCCESS}, "make test output indicated success";
-
+
$output = stdout_stderr_of( sub {
$success = $mb->do_system(@make, 'realclean');
});
# Try again with some Makefile.PL arguments
test_makefile_creation($mb, [], 'INSTALLDIRS=vendor', 'realclean');
-
+
# Try again using distclean
test_makefile_creation($mb, [], '', 'distclean');
sub test_makefile_creation {
my ($build, $preargs, $postargs, $cleanup) = @_;
-
+
my ($output, $result);
# capture output to avoid polluting our test output
$output = stdout_stderr_of( sub {
}
ok $result, $label;
ok -e $makefile, "$makefile exists";
-
+
if ($cleanup) {
# default to 'realclean' unless we recognize the clean method
$cleanup = 'realclean' unless $cleanup =~ /^(dist|real)clean$/;
}
sub find_params_in_makefile {
- my $fh = IO::File->new( $makefile, 'r' )
+ my $fh = IO::File->new( $makefile, 'r' )
or die "Can't read $makefile: $!";
local($/) = "\n";
my %test_config;
foreach my $type (keys %$defaults) {
my $prefix = shift @prefixes || [qw(foo bar)];
- $test_config{$type} = catdir(File::Spec->rootdir, @$prefix,
+ $test_config{$type} = catdir(File::Spec->rootdir, @$prefix,
@{$defaults->{$type}});
}
# Poke at the innards of MB to change the default install locations.
my $old = $mb->install_sets->{site};
$mb->install_sets->{site} = \%test_config;
- $mb->config(siteprefixexp => catdir(File::Spec->rootdir,
+ $mb->config(siteprefixexp => catdir(File::Spec->rootdir,
'wierd', 'prefix'));
my $prefix = catdir('another', 'prefix');
use lib 't/lib';
use MBTest;
-my @unix_splits =
+my @unix_splits =
(
{ q{one t'wo th'ree f"o\"ur " "five" } => [ 'one', 'two three', 'fo"ur ', 'five' ] },
{ q{ foo bar } => [ 'foo', 'bar' ] },
{ qq{one\\\ntwo} => [ "one\ntwo" ] }, # TODO
);
-my @win_splits =
+my @win_splits =
(
{ 'a" "b\\c" "d' => [ 'a b\c d' ] },
{ '"a b\\c d"' => [ 'a b\c d' ] },
{
# Make sure copy_if_modified() can handle spaces in filenames
-
+
my @tmp;
push @tmp, MBTest->tmpdir for (0 .. 1);
-
+
my $filename = 'file with spaces.txt';
-
+
my $file = File::Spec->catfile($tmp[0], $filename);
my $fh = IO::File->new($file, '>') or die "Can't create $file: $!";
print $fh "Foo\n";
$fh->close;
ok -e $file;
-
-
+
+
my $file2 = $mb->copy_if_modified(from => $file, to_dir => $tmp[1]);
ok $file2;
ok -e $file2;
# Try some dir_contains() combinations
my $first = File::Spec->catdir('', 'one', 'two');
my $second = File::Spec->catdir('', 'one', 'two', 'three');
-
+
ok( Module::Build->dir_contains($first, $second) );
}
sub ACTION_bar { die "barey" }
sub ACTION_baz { die "bazey" }
- # guess we can have extra pod later
+ # guess we can have extra pod later
=over
sub ACTION_baz { die "bazey" }
sub ACTION_batz { die "batzey" }
- # guess we can have extra pod later
+ # guess we can have extra pod later
# Though, I do wonder whether we should allow them to mix...
# maybe everything should have to be head2?
bar => "\n=head3 bears\n\nBe careful with bears.\n",
baz => "\n=head4 What's a baz\\?\n",
);
-
+
foreach my $action (qw(foo bar baz)) {
my $doc = $mb->get_action_docs($action);
ok($doc, "got doc for '$action'");
{
eval {$mb->dispatch('install', destdir => $destdir)};
is $@, '';
-
+
my @libdir = strip_volume( $mb->install_destination('lib') );
my $install_to = File::Spec->catfile($destdir, @libdir, $dist->name ) . '.pm';
file_exists($install_to);
-
+
local @INC = (@INC, File::Spec->catdir($destdir, @libdir));
eval "require @{[$dist->name]}";
is $@, '';
-
+
# Make sure there's a packlist installed
my $archdir = $mb->install_destination('arch');
my @dirs = strip_volume($archdir);
{
# Test the ConfigData stuff
-
+
$mb->config_data(foo => 'bar');
$mb->features(baz => 1);
$mb->auto_features(auto_foo => {requires => {'File::Spec' => 0}});
eval {$mb->dispatch('install', destdir => $destdir)};
is $@, '';
-
+
my @libdir = strip_volume( $mb->install_destination('lib') );
local @INC = (@INC, File::Spec->catdir($destdir, @libdir));
eval "require @{[$dist->name]}::ConfigData";
is $mb->feature('auto_foo'), 1;
-
+
SKIP: {
skip $@, 5 if @_;
my $libdir = File::Spec->catdir('', 'foo', 'lib');
eval {$mb->run_perl_script('Build.PL', [], ['--install_path', "lib=$libdir"])};
is $@, '';
-
+
my $cmd = 'Build';
$cmd .= ".COM" if $^O eq 'VMS';
eval {$mb->run_perl_script($cmd, [], ['install', '--destdir', $destdir])};
eval {$mb->run_perl_script($cmd, [], ['install', '--destdir', $destdir,
'--install_base', $basedir])};
is $@, '';
-
+
$install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm';
is -e $install_to, 1, "Look for file at $install_to";
-
+
eval {$mb->dispatch('realclean')};
is $@, '';
}
$expect = lc($expect) if $^O eq 'VMS';
is $pods->{$expect}, $expect;
-
+
my $pms = $mb->_find_file_by_type('awefawef', 'lib');
ok $pms;
is keys %$pms, 0;
-
+
$pms = $mb->_find_file_by_type('pod', 'awefawef');
ok $pms;
is keys %$pms, 0;
ok ! $mb->contains_pod($from), "$from should not contain POD";
next;
}
-
+
my $to = File::Spec->catfile('blib', ($from =~ /^[\.\/\[]*lib/ ? 'libdoc' : 'bindoc'), $v);
ok $mb->contains_pod($from), "$from should contain POD";
ok -e $to, "Created $to manpage";
my $provides; # Used a bunch of times below
-my $pod_text = <<'---';
+my $pod_text = <<'---';
=pod
=head1 NAME
-Simple - A simple module
+Simple - A simple module
=head1 AUTHOR
ok( -e "lib/Simple.pm", "Creating Simple.pm" );
my $mb = Module::Build->new_from_context;
$mb->do_create_readme;
-like( slurp("README"), qr/NAME/,
+like( slurp("README"), qr/NAME/,
"Generating README from .pm");
-is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
+is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
"Extracting AUTHOR from .pm");
-is( $mb->dist_abstract, "A simple module",
+is( $mb->dist_abstract, "A simple module",
"Extracting abstract from .pm");
# .pm File with pod in separate file
$mb = Module::Build->new_from_context;
$mb->do_create_readme;
like( slurp("README"), qr/NAME/, "Generating README from .pod");
-is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
+is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
"Extracting AUTHOR from .pod");
-is( $mb->dist_abstract, "A simple module",
+is( $mb->dist_abstract, "A simple module",
"Extracting abstract from .pod");
-# .pm File with pod and separate pod file
+# .pm File with pod and separate pod file
#
$dist->change_file( 'lib/Simple.pm', <<'---' );
{
package IO::StringBased;
-
+
sub TIEHANDLE {
my ($class, $string) = @_;
return bless {
data => [ map "$_\n", split /\n/, $string],
}, $class;
}
-
+
sub READLINE {
shift @{ shift()->{data} };
}
my $pp = Module::Build::PodParser->new(fh => \*FH);
ok $pp, 'object created';
-
+
is_deeply $pp->get_author, [], 'author';
is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract';
}
# falsify compiler and test error handling
#--------------------------------------------------------------------------#
+# clear $ENV{CC} so we are sure to fail to find our fake compiler :-)
+local $ENV{CC};
+
my $err = stderr_of( sub {
$mb = $dist->new_from_context( config => { cc => "adfasdfadjdjk" } )
});
my $dist = DistGen->new(dir => MBTest->tmpdir);
$dist->add_file('bin/foo', undent(<<' ---'));
#!/usr/bin/perl
-
+
package bin::foo;
$VERSION = 0.01;
$dist->add_file('t/special_ext.st', <<'---' );
-#!perl
+#!perl
use Test::More tests => 2;
ok(1, 'first test in special_ext');
ok(1, 'second test in special_ext');
$::x = 0;
my $mb = Module::Build->subclass(
code => q#
- sub ACTION_testspecial {
+ sub ACTION_testspecial {
$::x++;
shift->generic_test(type => 'special');
}
my $dist = DistGen->new()->chdir_in;
$dist->add_file('t/special_ext.st', <<'---');
-#!perl
+#!perl
use Test::More tests => 2;
ok(1, 'first test in special_ext');
ok(1, 'second test in special_ext');
---
$dist->add_file('t/another_ext.at', <<'---');
-#!perl
+#!perl
use Test::More tests => 2;
ok(1, 'first test in another_ext');
ok(1, 'second test in another_ext');
---
$dist->add_file('t/foo.txt', <<'---');
-#!perl
+#!perl
use Test::More tests => 1;
ok 0, "don't run this non-test file";
die "don't run this non-test file";
my $mb = Module::Build->subclass(
code => q#
- sub ACTION_testspecial {
+ sub ACTION_testspecial {
shift->generic_test(type => 'special');
}
- sub ACTION_testanother {
+ sub ACTION_testanother {
shift->generic_test(type => 'another');
}
#
$dist->revert;
$dist->add_file('t/foo/special.st', <<'---');
-#!perl
+#!perl
use Test::More tests => 2;
ok(1, 'first test in special_ext');
ok(1, 'second test in special_ext');
my $mb = Module::Build->subclass(
code => q#
- sub ACTION_testspecial {
+ sub ACTION_testspecial {
shift->generic_test(type => 'special');
}
- sub ACTION_testanother {
+ sub ACTION_testanother {
shift->generic_test(type => 'another');
}
#
is( run_sample( $p => '~/foo' )->$p(), "$home/foo" );
is( run_sample( $p => '~/ foo')->$p(), "$home/ foo" );
-
+
is( run_sample( $p => '~/fo o')->$p(), "$home/fo o" );
is( run_sample( $p => 'foo~' )->$p(), 'foo~' );
my @info = eval { getpwuid $> };
skip "No home directory for tilde-expansion tests", 1 if $@;
my ($me, $home) = @info[0,7];
-
+
my $expected = "$home/foo";
if ($^O eq 'VMS') {