Billy N. Patton <[EMAIL PROTECTED]> writes:
>I looked through man pages and read about overloading colon definitions.
>I'm already doing that.  But MakeMaker spits out :
>FIXIN = $(PERLRUN) "-MExtUtils::MY" \
>     -e "MY->fixin(shift)"

So you want to over-ride PERLRUN so that it uses the perl you want 
to apear in #! line rather than the one with the links resolved.
The easy way to do that it modify Config.pm to have "right" path-to-perl
(or get your admin to do that right in the 1st place.)

But assuming you need to do this in Makefile.PL
you need something like:

package MY;
sub constants
{
 local $_ = shift->SUPER::constants(@_);
 s#/apps/perl/5.8.0/bin/perl#/usr/local/bin/perl#g;
 return $_;
}

But you probably want to generalize the "from" part of subsitute.



>
>
>I tried :
>sub MY::subdirs {
>'
>FIXIN =
>all ::
>
>
>But that resulted in :
>EXE_FILES = clean_laff
>
>
>FIXIN = $(PERLRUN) "-MExtUtils::MY" \
>     -e "MY->fixin(shift)"
>
>pure_all :: $(INST_SCRIPT)/clean_laff
>       @$(NOOP)
>
>realclean ::
>       rm -f $(INST_SCRIPT)/clean_laff
>
>$(INST_SCRIPT)/clean_laff: clean_laff Makefile $(INST_SCRIPT)/.exists
>       @rm -f $(INST_SCRIPT)/clean_laff
>       cp clean_laff $(INST_SCRIPT)/clean_laff
>       $(FIXIN) $(INST_SCRIPT)/clean_laff
>       [EMAIL PROTECTED](CHMOD) $(PERM_RWX) $(INST_SCRIPT)/clean_laff
>
>
># --- MakeMaker subdirs section:
>
>
>FIXIN =
>
>
>Which tried to execute clean_laff.
>I dont want to overload :
>$(INST_SCRIPT)/clean_laff: ....
>
>That would result in mas quantities of overloaded colon definitions.
>If I have to do that then I don't need to CORNfusion of MakeMaker
>
>
>Steven N. Hirsch wrote:
>> On Tue, 19 Aug 2003, Billy N. Patton wrote:
>> 
>> 
>>>I use a ExtUtils::MakeMaker to create my makefile.
>>>
>>>In my source file I have:
>>>#!/usr/local/bin/perl
>>>use strict;
>>>require 5.005;
>>>
>>>After installation into the blib and therefore the final destination I get:
>>>#!/apps/perl/5.8.0/bin/perl
>>>
>>>eval 'exec /apps/perl/5.8.0/bin/perl  -S $0 ${1+"$@"}'
>>>     if 0; # not running under some shell
>>>use strict;
>>>require 5.005;
>>>
>>>
>>>
>>>ls -l /usr/local/bin/per*
>>>/usr/local/bin/perl -> perl-5.8.0
>>>/usr/local/bin/perl-5.8.0 -> /apps/perl/5.8.0/bin/perl
>>>
>>>
>>>I have determined that the following line makes the change:
>>>/usr/local/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" 
>>>blib/script/clean_laff
>>>
>>>How do I stop this from happening?
>> 
>> 
>> Although there may be a simpler method, I usually resort to subclassing 
>> the offending method.  There's some verbiage in the MakeMaker man page 
>> which gives an example of the technique.
>> 
>> If anyone knows of comprehensive documentation on MakeMaker (past what's 
>> in the man pages) please speak up?  
>> 
>> Steve
>> 
>> 

Reply via email to