Skip Menu |

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 36831
Status: resolved
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: nyoescape [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.75
Fixed in: (no value)



Subject: [PATCH] Cannot customize Makefile 'dist' section options
Hello all, I've tried, to no avail, to switch to bzip2 compression for my distribution bundles. I have used Module::Install::MakeMaker for this, adding the following lines at the end of my Makefile.PL: WriteMakefile('dist' => { COMPRESS => "bzip2", SUFFIX => ".bz2" }); Looking at the ExtUtils::MakeMaker documentation, this ought to work. However, gzip and .gz files are still being used. I debugged Makefile.PL and I think I've found the lines which overwrite the 'dist' options. They start at line 176 of Module::Install::Makefile (I'm using 0.75, which seems to be the latest version): my $user_preop = delete $args{dist}->{PREOP}; if (my $preop = $self->admin->preop($user_preop)) { $args{dist} = $preop; } Apparently, it always clobbers the custom 'dist' options, as even if the user doesn't specify anything, a default value is used. Attached is a patch which just copies over all the fields returned from the preop extension, instead of overwriting all the dist options. Keep up the good work! Antonio
Subject: patch.diff
--- Makefile.pm.orig 2008-06-18 12:32:02.000000000 +0200 +++ Makefile.pm 2008-06-18 12:34:11.000000000 +0200 @@ -174,7 +174,7 @@ my $user_preop = delete $args{dist}->{PREOP}; if (my $preop = $self->admin->preop($user_preop)) { - $args{dist} = $preop; + $args{dist}->{$_} = $preop->{$_} for keys %$preop; } my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
Fixed, will appear in 0.77