'Module::Build' => {
'MAINTAINER' => 'kwilliams',
- 'DISTRIBUTION' => 'LEONT/Module-Build-0.4003.tar.gz',
+ 'DISTRIBUTION' => 'LEONT/Module-Build-0.4005.tar.gz',
'FILES' => q[cpan/Module-Build],
'EXCLUDED' => [
qw( t/par.t
Revision history for Perl extension Module::Build.
+0.4005 - Thu Apr 25 15:10:14 CEST 2013
+
+ [ENHANCEMENTS]
+
+ - Added --pureperl-only support
+
+ [BUG FIXES]
+
+ - #72176: pod2html will fail with an empty podpath in some cases. [Phillip Moore]
+
+ - Fix links between modules in HTML docs output [Michael Wild, Leon Timmermans]
+
+0.4004 - Fri Mar 29 15:05:00 CET 2013
+
+ [BUG FIXES]
+
+ - Minor VMS fix for @INC [Craig Berry]
+
+ [ENHANCEMENTS]
+
+ - test_requires support has been added [Matsuno Tokuhiro]
+
0.4003 - Sat Aug 18 11:17:49 CEST 2012
[BUG FIXES]
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
is performed. See also the L<add_to_cleanup()|/"add_to_cleanup(@files)">
method.
+=item allow_pureperl
+
+[version 0.4005]
+
+A bool indicating the module is still functional without its xs parts.
+When an XS module is build with --pureperl_only, it will otherwise fail.
+
=item auto_configure_requires
[version 0.34]
See the documentation for L<Module::Build::Authoring/"PREREQUISITES">
for the details of how requirements can be specified.
+=item test_requires
+
+[version 0.4004]
+
+Modules listed in this section must be installed before testing the distribution.
+
+See the documentation for L<Module::Build::Authoring/"PREREQUISITES">
+for the details of how requirements can be specified.
+
=item create_packlist
[version 0.28]
Returns a reference to a hash describing all prerequisites. The keys of the
hash will be the various prerequisite types ('requires', 'build_requires',
-'configure_requires', 'recommends', or 'conflicts') and the values will be
+'test_requires', 'configure_requires', 'recommends', or 'conflicts') and the values will be
references to hashes of module names and version numbers. Only prerequisites
types that are defined will be included. The C<prereq_data> action is just a
thin wrapper around the C<prereq_data()> method and dumps the hash as a string
=item allow_mb_mismatch()
+=item allow_pureperl()
+
=item auto_configure_requires()
=item autosplit()
=item program_name()
+=item pureperl_only()
+
=item quiet()
=item recommends()
=item test_file_exts()
+=item test_requires()
+
=item use_rcfile()
=item use_tap_harness()
might also think of this as "can use" or "is aware of" or "changes
behavior in the presence of".
+=item test_requires
+
+Items that are necessary for testing.
+
=item conflicts
Items that can cause problems with this distribution when installed.
use vars qw($VERSION);
use warnings;
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
BEGIN { require 5.006001 }
__PACKAGE__->add_property(use_tap_harness => 0);
__PACKAGE__->add_property(cpan_client => 'cpan');
__PACKAGE__->add_property(tap_harness_args => {});
+__PACKAGE__->add_property(pureperl_only => 0);
+__PACKAGE__->add_property(allow_pureperl => 0);
__PACKAGE__->add_property(
'installdirs',
default => 'site',
}
{
- my @prereq_action_types = qw(requires build_requires conflicts recommends);
+ my @prereq_action_types = qw(requires build_requires test_requires conflicts recommends);
foreach my $type (@prereq_action_types) {
__PACKAGE__->add_property($type => {});
}
my @myINC = $self->_added_to_INC;
for (@myINC, values %q) {
- $_ = File::Spec->canonpath( $_ );
+ $_ = File::Spec->canonpath( $_ ) unless $self->is_vmsish;
s/([\\\'])/\\$1/g;
}
# XXX refactor this mapping somewhere
$mymeta->{prereqs}{runtime}{requires} = $prereqs->{requires};
$mymeta->{prereqs}{build}{requires} = $prereqs->{build_requires};
+ $mymeta->{prereqs}{test}{requires} = $prereqs->{test_requires};
$mymeta->{prereqs}{runtime}{recommends} = $prereqs->{recommends};
$mymeta->{prereqs}{runtime}{conflicts} = $prereqs->{conflicts};
# delete empty entries
use_tap_harness
tap_harness_args
cpan_client
+ pureperl_only
+ allow_pureperl
); # normalize only selected option names
return $opt;
debug
sign
use_tap_harness
+ pureperl_only
+ allow_pureperl
);
# inverted boolean options; eg --noverbose or --no-verbose
sub process_xs_files {
my $self = shift;
+ return if $self->pureperl_only && $self->allow_pureperl;
my $files = $self->find_xs_files;
+ croak 'Can\'t build xs files under --pureperl-only' if %$files && $self->pureperl_only;
while (my ($from, $to) = each %$files) {
unless ($from eq $to) {
$self->add_to_cleanup($to);
foreach my $regexp ( @{ $args{exclude} } ) {
next FILE if $file =~ $regexp;
}
+ $file = $self->localize_file_path($file);
$files{$file} = File::Spec->abs2rel($file, $dir) if $self->contains_pod( $file )
}
}
: $self->original_prefix('core');
my $htmlroot = $self->install_sets('core')->{libhtml};
- my @podpath = (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d }
+ my @podpath = ( (map { File::Spec->abs2rel($_ ,$podroot) } grep { -d }
( $self->install_sets('core', 'lib'), # lib
$self->install_sets('core', 'bin'), # bin
$self->install_sets('site', 'lib'), # site/lib
- ) ), File::Spec->rel2abs($self->blib);
+ ) ), File::Spec->rel2abs($self->blib) );
my $podpath = $ENV{PERL_CORE}
? File::Spec->catdir($podroot, 'lib')
} or $self->log_warn("[$htmltool] pod2html (" .
join(", ", map { "q{$_} => q{$opts{$_}}" } (keys %opts)) . ") failed: $@");
} else {
- my $path2root = join( '/', ('..') x (@rootdirs+@dirs) );
+ my $path2root = File::Spec->catdir(File::Spec->updir x @dirs);
my $fh = IO::File->new($infile) or die "Can't read $infile: $!";
my $abstract = Module::Build::PodParser->new(fh => $fh)->get_abstract();
$self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
or die "Error executing 'Build.PL' in dist directory: $!";
- $self->run_perl_script('Build')
- or die "Error executing 'Build' in dist directory: $!";
- $self->run_perl_script('Build', [], ['test'])
+ $self->run_perl_script($self->build_script)
+ or die "Error executing $self->build_script in dist directory: $!";
+ $self->run_perl_script($self->build_script, [], ['test'])
or die "Error executing 'Build test' in dist directory";
});
}
sub {
$self->run_perl_script('Build.PL')
or die "Error executing 'Build.PL' in dist directory: $!";
- $self->run_perl_script('Build')
- or die "Error executing 'Build' in dist directory: $!";
- $self->run_perl_script('Build', [], ['install'])
+ $self->run_perl_script($self->build_script)
+ or die "Error executing $self->build_script in dist directory: $!";
+ $self->run_perl_script($self->build_script, [], ['install'])
or die "Error executing 'Build install' in dist directory";
}
);
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
use File::Basename ();
use File::Spec;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Config;
package Module::Build::Cookbook;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
=head1 NAME
package Module::Build::Dumper;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
# 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.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
require Module::Metadata;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Data::Dumper;
use IO::File;
use vars qw($VERSION);
use IO::File;
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$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.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use vars qw(@ISA);
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Base;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Config;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use vars qw(@ISA);
package inc::latest;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use Carp;
package inc::latest::private;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4003';
+$VERSION = '0.4005';
$VERSION = eval $VERSION;
use File::Spec;
is keys %$pods, 1;
my $expect = $mb->localize_file_path('lib/Simple/Docs.pod');
- # TODO:
- # True for traditional VMS, but will need to be changed when ODS-5 support
- # for case preserved filenames is active.
- # The issue is that the keys to the $pods hash are currently being set to
- # lowercase on VMS so can not be found in exact case.
-
- $expect = lc($expect) if $^O eq 'VMS';
-
is $pods->{$expect}, $expect;
my $pms = $mb->_find_file_by_type('awefawef', 'lib');
use strict;
use lib 't/lib';
-use MBTest tests => 51;
+use MBTest tests => 52;
blib_load('Module::Build');
blib_load('Module::Build::ConfigData');
dist_version => '3.14159265',
dist_author => [ 'Simple Simon <ss\@somewhere.priv>' ],
dist_abstract => 'Something interesting',
+ test_requires => {
+ 'Test::More' => 0.98,
+ },
license => 'perl',
meta_add => {
keywords => [qw(super duper something)],
is_deeply $node->{author}, $metadata{dist_author};
is $node->{license}, $metadata{license};
is_deeply $node->{configure_requires}, $mb_config_req, 'Add M::B to configure_requires';
+ is_deeply $node->{test_requires}, {
+ 'Test::More' => '0.98',
+ }, 'Test::More was required by ->new';
like $node->{generated_by}, qr{Module::Build};
ok defined( $node->{'meta-spec'}{version} ),
"'meta-spec' -> 'version' field present in META.yml";
} elsif ( !$Config{usedl} ) {
plan skip_all => 'Perl not compiled for dynamic loading'
} else {
- plan tests => 20;
+ plan tests => 22;
}
require Cwd;
$tmp = MBTest->tmpdir( $tmp_exec ? () : (DIR => Cwd::cwd) );
stdout_stderr_of( sub { eval { $mb->dispatch('test') } } );
is $@, '';
+eval { $mb->dispatch('clean') };
+
+eval { $mb->dispatch('build', 'pureperl_only' => 1) };
+like $@, qr/\ACan\'t build xs files under --pureperl-only/, 'Can\'t build xs under pureperl';
+
+eval { $mb->dispatch('build', pureperl_only => 1, allow_pureperl => 1) };
+is $@, '', 'Can\'t build xs under pureperl, unless allow_pureperl';
+
eval { $mb->dispatch('realclean') };
is $@, '';