Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 22103
Status: rejected
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: rybskej [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 6.17
Fixed in: (no value)



Subject: MY::all_target doesn't override target 'all'
Using the documented procedure to overload Makefile sections: http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.31/lib/ExtUtils/MakeMaker.pm#Overriding_MakeMaker_Methods I am unable to override the 'all' section using MY::all_target. For example, the following does not change the generated Makefile: sub all_target { my $inherited = shift->SUPER::all_target(@_); $inherited .= '${ECHO} "I was able to override all_target!"'; $inherited; }; whereas the following does: sub clean { my $inherited = shift->SUPER::clean(@_); $inherited .= '${ECHO} "I was able to override clean!"'; $inherited; }; As a dirty fix, I found that the following forced overload would work as an alternative "override" of all_target: package ExtUtils::MM_Any; *__all_target = \&all_target; *all_target = sub { my $inherited = shift->__all_target(@_); $inherited .= '${ECHO} "I was able to override clean!"'; $inherited; };
Unfortunately the way MakeMaker is architected means it selects what methods are overridable. This is crazy, but that's the way it is. In addition, not every target has a _target method. It would require a major refactoring to fix, and retain backwards compatibility, and it's too late in the game to do that. So I'm going to reject this ticket and point you towards Module::Build where you can simply override ACTION_build.