use strict;
use vars qw($VERSION);
-$VERSION = '0.03';
+$VERSION = '0.2808_01';
use File::Spec;
use IO::File;
(
TEST_VERBOSE => 'verbose',
VERBINST => 'verbose',
- INC => sub { map {('--extra_compiler_flags', "-I$_")} Module::Build->split_like_shell(shift) },
+ INC => sub { map {('--extra_compiler_flags', $_)} Module::Build->split_like_shell(shift) },
POLLUTE => sub { ('--extra_compiler_flags', '-DPERL_POLLUTE') },
INSTALLDIRS => sub {local $_ = shift; 'installdirs=' . (/^perl$/ ? 'core' : $_) },
LIB => sub { ('--install_path', 'lib='.shift()) },
print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n";
+ # Minimum perl version should be specified as "require 5.XXXXXX" in
+ # Makefile.PL
+ my $requires = $build->requires;
+ if ( my $minimum_perl = $requires->{perl} ) {
+ print {$fh} "require $minimum_perl;\n";
+ }
+
# If a *bundled* custom subclass is being used, make sure we add its
# directory to @INC.
my $subclass_load = '';
warn "Unknown 'build_class', defaulting to 'Module::Build'\n";
$args{build_class} = 'Module::Build';
}
+ my $class = $args{build_class};
- my $perl = $args{build_class}->find_perl_interpreter;
- my $os_type = $args{build_class}->os_type;
- my $noop = ($os_type eq 'Windows' ? 'rem>nul' :
- $os_type eq 'VMS' ? 'Continue' :
+ my $perl = $class->find_perl_interpreter;
+ my $noop = ($class->is_windowsish ? 'rem>nul' :
+ $class->is_vmsish ? 'Continue' :
'true');
my $Build = 'Build --makefile_env_macros 1';
@ $noop
EOF
- foreach my $action ($args{build_class}->known_actions) {
+ foreach my $action ($class->known_actions) {
next if $action =~ /^(all|realclean|force_do_it)$/; # Don't double-define
$maketext .= <<"EOF";
$action : force_do_it
=head1 AUTHOR
-Ken Williams <ken@cpan.org>
+Ken Williams <kwilliams@cpan.org>
=head1 COPYRIGHT
-Copyright (c) 2001-2005 Ken Williams. All rights reserved.
+Copyright (c) 2001-2006 Ken Williams. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.