X-Git-Url: http://git.home-dn.net/?p=manu%2FRT-Extension-WatchedQueues.git;a=blobdiff_plain;f=inc%2FModule%2FInstall%2FMakefile.pm;h=92cd1eff68e43c78fa65fddf4194dd17a10445ca;hp=e747945a40acc63025c5ff80609127b80d255509;hb=48e8f74ef6190566955be7a09524b449e936680d;hpb=e1833069d86f0e670e7a4be1cd04a5daa97b2d92 diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm index e747945..92cd1ef 100644 --- a/inc/Module/Install/Makefile.pm +++ b/inc/Module/Install/Makefile.pm @@ -1,3 +1,4 @@ +#line 1 package Module::Install::Makefile; use strict 'vars'; @@ -6,7 +7,7 @@ use ExtUtils::MakeMaker (); use vars qw{$VERSION $ISCORE @ISA}; BEGIN { - $VERSION = '0.72'; + $VERSION = '0.77'; $ISCORE = 1; @ISA = qw{Module::Install::Base}; } @@ -35,9 +36,9 @@ sub prompt { sub makemaker_args { my $self = shift; - my $args = ($self->{makemaker_args} ||= {}); - %$args = ( %$args, @_ ) if @_; - $args; + my $args = ( $self->{makemaker_args} ||= {} ); + %$args = ( %$args, @_ ); + return $args; } # For mm args that take multiple space-seperated args, @@ -115,7 +116,13 @@ sub write { # Make sure we have a new enough require ExtUtils::MakeMaker; - $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION ); + + # MakeMaker can complain about module versions that include + # an underscore, even though its own version may contain one! + # Hence the funny regexp to get rid of it. See RT #35800 + # for details. + + $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ ); # Generate the my $args = $self->makemaker_args; @@ -174,7 +181,9 @@ sub write { my $user_preop = delete $args{dist}->{PREOP}; if (my $preop = $self->admin->preop($user_preop)) { - $args{dist} = $preop; + foreach my $key ( keys %$preop ) { + $args{dist}->{$key} = $preop->{$key}; + } } my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); @@ -241,131 +250,4 @@ sub postamble { __END__ -=pod - -=head1 NAME - -Module::Install::MakeMaker - Extension Rules for ExtUtils::MakeMaker - -=head1 SYNOPSIS - -In your F: - - use inc::Module::Install; - WriteMakefile(); - -=head1 DESCRIPTION - -This module is a wrapper around B. It exports -two functions: C (an alias for C) -and C. - -The C function will pass on keyword/value pair functions -to C. The required parameters -C and C (or C) are not necessary if -it can find them unambiguously in your code. - -=head1 CONFIGURATION OPTIONS - -This module also adds some Configuration parameters of its own: - -=head2 NAME - -The NAME parameter is required by B. If you have a -single module in your distribution, or if the module name indicated by -the current directory exists under F, this module will use the -guessed package name as the default. - -If this module can't find a default for C it will ask you to specify -it manually. - -=head2 VERSION - -B requires either the C or C -parameter. If this module can guess the package's C, it will attempt -to parse the C from it. - -If this module can't find a default for C it will ask you to -specify it manually. - -=head1 MAKE TARGETS - -B provides you with many useful C targets. A -C B is the word you specify after C, like C -for C. Some of the more useful targets are: - -=over 4 - -=item * all - -This is the default target. When you type C it is the same as -entering C. This target builds all of your code and stages it -in the C directory. - -=item * test - -Run your distribution's test suite. - -=item * install - -Copy the contents of the C directory into the appropriate -directories in your Perl installation. - -=item * dist - -Create a distribution tarball, ready for uploading to CPAN or sharing -with a friend. - -=item * clean distclean purge - -Remove the files created by C and C. - -=item * help - -Same as typing C. - -=back - -This module modifies the behaviour of some of these targets, depending -on your requirements, and also adds the following targets to your Makefile: - -=over 4 - -=item * cpurge - -Just like purge, except that it also deletes the files originally added -by this module itself. - -=item * chelp - -Short cut for typing C. - -=item * distsign - -Short cut for typing C, for B users to -sign the distribution before release. - -=back - -=head1 SEE ALSO - -L, L, L - -=head1 AUTHORS - -Audrey Tang Eautrijus@autrijus.orgE - -Based on original works by Brian Ingerson EINGY@cpan.orgE - -=head1 COPYRIGHT - -Copyright 2002, 2003, 2004 by -Audrey Tang Eautrijus@autrijus.orgE, -Brian Ingerson Eingy@cpan.orgE - -This program is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -See L - -=cut +#line 379