develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #36554] Re: [Module::Build] Edge cases in "find_perl" algorithms

Ken Williams
July 14, 2005 08:28
[perl #36554] Re: [Module::Build] Edge cases in "find_perl" algorithms
Message ID:
# New Ticket Created by  Ken Williams 
# Please include the string:  [perl #36554]
# in the subject line of all future correspondence about this issue. 
# <URL: >

On Jul 14, 2005, at 2:58 AM, Michael G Schwern wrote:

> On Wed, Jul 13, 2005 at 10:15:50PM -0500, Ken Williams wrote:
>> That's good analysis, but I don't actually think anything should be
>> changed in Module::Build's method until we can demonstrate a case in
>> which it fails, and right now I know of none.  Since it checks
>> Config::myconfig(), it ensures that the version and any compilation
>> options are correct.
> Installing Module::Build with an uninstalled Perl (ie. you build Perl 
> and
> run it from the source directory) will fail to find perl.
> 0 ~/devel/Module-Build$ ../../../../usr/local/src/bleadperl/perl 
> -I/usr/local/src/bleadperl/lib -w Build.PL
> Warning: Can't locate your perl binary at lib/Module/Build/ 
> line 139.

If we do allow an uninstalled perl, then what happens when the user 
does "Build install"?  Unless we add code for adjusting the path, or 
unless the user provides a suitable --destdir, it'll install to a 
location that's not ripe yet.

The fact that you have to use a relative path rather than an absolute 
one is a little bit weird, eh?  It means you have to know this weird 
fact about how perl will be searched for.

> More common than you think, especially when working on bleadperl.  
> MakeMaker
> even has special code to deal with this case:
> 0 ~/devel/ExtUtils-MakeMaker$ ../../../../usr/local/src/bleadperl/perl 
> -I/usr/local/src/bleadperl/lib -w Makefile.PL
> ... Detected uninstalled Perl.  Trying to continue.

How do you detect the fact that it's uninstalled?  If this is truly the 
main use-case for searching in CWD, perhaps we should just add such 
detection code, and offer to set --destdir appropriately.

  -Ken Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About