7 |
|
|
8 |
use vars qw{$VERSION $ISCORE @ISA}; |
use vars qw{$VERSION $ISCORE @ISA}; |
9 |
BEGIN { |
BEGIN { |
10 |
$VERSION = '0.67'; |
$VERSION = '0.76'; |
11 |
$ISCORE = 1; |
$ISCORE = 1; |
12 |
@ISA = qw{Module::Install::Base}; |
@ISA = qw{Module::Install::Base}; |
13 |
} |
} |
36 |
|
|
37 |
sub makemaker_args { |
sub makemaker_args { |
38 |
my $self = shift; |
my $self = shift; |
39 |
my $args = ($self->{makemaker_args} ||= {}); |
my $args = ( $self->{makemaker_args} ||= {} ); |
40 |
%$args = ( %$args, @_ ) if @_; |
%$args = ( %$args, @_ ); |
41 |
$args; |
return $args; |
42 |
} |
} |
43 |
|
|
44 |
# For mm args that take multiple space-seperated args, |
# For mm args that take multiple space-seperated args, |
63 |
sub clean_files { |
sub clean_files { |
64 |
my $self = shift; |
my $self = shift; |
65 |
my $clean = $self->makemaker_args->{clean} ||= {}; |
my $clean = $self->makemaker_args->{clean} ||= {}; |
66 |
%$clean = ( |
%$clean = ( |
67 |
%$clean, |
%$clean, |
68 |
FILES => join(' ', grep length, $clean->{FILES}, @_), |
FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), |
69 |
); |
); |
70 |
} |
} |
71 |
|
|
72 |
sub realclean_files { |
sub realclean_files { |
73 |
my $self = shift; |
my $self = shift; |
74 |
my $realclean = $self->makemaker_args->{realclean} ||= {}; |
my $realclean = $self->makemaker_args->{realclean} ||= {}; |
75 |
%$realclean = ( |
%$realclean = ( |
76 |
%$realclean, |
%$realclean, |
77 |
FILES => join(' ', grep length, $realclean->{FILES}, @_), |
FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), |
78 |
); |
); |
79 |
} |
} |
80 |
|
|
104 |
unless ( -d $dir ) { |
unless ( -d $dir ) { |
105 |
die "tests_recursive dir '$dir' does not exist"; |
die "tests_recursive dir '$dir' does not exist"; |
106 |
} |
} |
|
require File::Find; |
|
107 |
%test_dir = (); |
%test_dir = (); |
108 |
|
require File::Find; |
109 |
File::Find::find( \&_wanted_t, $dir ); |
File::Find::find( \&_wanted_t, $dir ); |
110 |
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir ); |
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir ); |
111 |
} |
} |
114 |
my $self = shift; |
my $self = shift; |
115 |
die "&Makefile->write() takes no arguments\n" if @_; |
die "&Makefile->write() takes no arguments\n" if @_; |
116 |
|
|
117 |
|
# Make sure we have a new enough |
118 |
|
require ExtUtils::MakeMaker; |
119 |
|
|
120 |
|
# MakeMaker can complain about module versions that include |
121 |
|
# an underscore, even though its own version may contain one! |
122 |
|
# Hence the funny regexp to get rid of it. See RT #35800 |
123 |
|
# for details. |
124 |
|
|
125 |
|
$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ ); |
126 |
|
|
127 |
|
# Generate the |
128 |
my $args = $self->makemaker_args; |
my $args = $self->makemaker_args; |
129 |
$args->{DISTNAME} = $self->name; |
$args->{DISTNAME} = $self->name; |
130 |
$args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args); |
$args->{NAME} = $self->module_name || $self->name; |
131 |
$args->{VERSION} = $self->version || $self->determine_VERSION($args); |
$args->{VERSION} = $self->version; |
132 |
$args->{NAME} =~ s/-/::/g; |
$args->{NAME} =~ s/-/::/g; |
133 |
if ( $self->tests ) { |
if ( $self->tests ) { |
134 |
$args->{test} = { TESTS => $self->tests }; |
$args->{test} = { TESTS => $self->tests }; |
153 |
map { @$_ } |
map { @$_ } |
154 |
map { @$_ } |
map { @$_ } |
155 |
grep $_, |
grep $_, |
156 |
($self->build_requires, $self->requires) |
($self->configure_requires, $self->build_requires, $self->requires) |
157 |
); |
); |
158 |
|
|
159 |
|
# Remove any reference to perl, PREREQ_PM doesn't support it |
160 |
|
delete $args->{PREREQ_PM}->{perl}; |
161 |
|
|
162 |
# merge both kinds of requires into prereq_pm |
# merge both kinds of requires into prereq_pm |
163 |
my $subdirs = ($args->{DIR} ||= []); |
my $subdirs = ($args->{DIR} ||= []); |
164 |
if ($self->bundles) { |
if ($self->bundles) { |
219 |
#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; |
#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; |
220 |
|
|
221 |
# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. |
# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. |
222 |
$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g; |
$makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; |
223 |
|
|
224 |
# XXX - This is currently unused; not sure if it breaks other MM-users |
# XXX - This is currently unused; not sure if it breaks other MM-users |
225 |
# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; |
# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; |
248 |
|
|
249 |
__END__ |
__END__ |
250 |
|
|
251 |
#line 363 |
#line 377 |