New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edge cases in "find_perl" algorithms #8020
Comments
From @schwernSeveral places try to convert $^X to an absolute path. CPAN->perl, The search order is typically some variant on: my @perls = ( foreach my $perl (@perls) { In the case when $^X cannot be found this algorithm is likely to find not Additionally, since 5.6 perl binaries have been named "perl5.6.1" and not So the @perls list should be: @perls = ($^X); Module::Build and CPANPLUS do not appear to be vulnerable to this as they Additionally, CPAN looks for $^X in the cwd but does it wrong. The # $^X is absolute # $^X is ./path/to/perl or ../path/to/perl. Make it This most closely simulates how a shell finds perl. CPAN.pm makes the $ ls ./perl $^X will be "perl". It will look for "$cwd/perl" and find the one in the MakeMaker, CPANPLUS and Module::Build do not handle this case at all, they do Module::Build has a heuristic which checks to see if the perl it has found To summarize: Change the filename search order to look for the most specific Add perlX.Y.Z to the filename search. (MB and CP not affected) Add a warning when we cannot find $^X and must fall back to Look for "$cwd/$^X" only when $^X is ./perl or ../perl. Compare myconfig of the found perl and the perl we were run with I'll patch up MakeMaker to do this and provide a patch for CPAN.pm. If I'm -- |
From @kenahooHi Schwern, That's good analysis, but I don't actually think anything should be Perhaps it could also check a variable like $Config{installarchlib} or On Jul 13, 2005, at 5:41 PM, Michael G Schwern wrote:
Regarding the current-working directory inspection, it seems to me that -Ken |
From @schwernOn Wed, Jul 13, 2005 at 10:15:50PM -0500, Ken Williams wrote:
Installing Module::Build with an uninstalled Perl (ie. you build Perl and 0 ~/devel/Module-Build$ ../../../../usr/local/src/bleadperl/perl -I/usr/local/src/bleadperl/lib -w Build.PL More common than you think, especially when working on bleadperl. MakeMaker 0 ~/devel/ExtUtils-MakeMaker$ ../../../../usr/local/src/bleadperl/perl -I/usr/local/src/bleadperl/lib -w Makefile.PL The simple fix is to do the Why wait until someone gets bit in the ass?
Or you could just compare the values of $INC{"Config.pm"}. -- |
From @kenahooOn Jul 14, 2005, at 2:58 AM, Michael G Schwern wrote:
If we do allow an uninstalled perl, then what happens when the user The fact that you have to use a relative path rather than an absolute
How do you detect the fact that it's uninstalled? If this is truly the -Ken |
From @schwernOn Thu, Jul 14, 2005 at 07:47:49AM -0500, Ken Williams wrote:
This is the user's problem, and presumably if they're installing modules with
I think most folks don't even think about it, it should just work. Why
Voodoo. There's a bunch of heuristics in MM_Unix around line 1604 # Make sure perl can find itself before it's installed. So that might be useful to put into MB. I think the Perl build process takes advantage of all this when it asks -- |
@jkeenan - Status changed from 'new' to 'open' |
From @jkeenanOn Wed Jul 13 15:41:54 2005, schwern wrote:
This RT was originally filed by Schwern in 2005. There was some Is this an issue which P5P needs to address? Is it something we could Thank you very much. |
From @LeontOn Sat, Sep 7, 2013 at 4:29 AM, James E Keenan via RT <
Yeah, I think this is a discussion for the toolchain gang, not p5p. Though Leon |
From @jkeenanOn Sat Sep 07 00:49:27 2013, LeonT wrote:
I forwarded the original post to the cpan-workers mailing list, where Thank you very much. |
From @jkeenanOn Sat Sep 07 14:48:59 2013, jkeenan wrote:
There have been no further posts to the cpan-workers mailing list in the Thank you very much. |
@jkeenan - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#36539 (status was 'rejected')
Searchable as RT36539$
The text was updated successfully, but these errors were encountered: