Re: [PATCH 3/8] perl: generalize the Git::LoadCPAN facility
- From
Todd Zullinger <tmz@pobox.com>
- Date
- Feb 17, 2018, 00:47 UTC
- Message-ID
- <20180217004753.GS27038@zaya.teonanacatl.net>
- In-Reply-To
- <20180216220300.GC216564@aiede.svl.corp.google.com>
Hi Jonathan,
Jonathan Nieder wrote:
> Todd Zullinger wrote:
[...]
Show 19 quoted lines
>> +++ b/Makefile >> @@ -296,6 +296,9 @@ all:: >> # >> # Define NO_PERL if you do not want Perl scripts or libraries at all. >> # >> +# Define NO_PERL_CPAN_FALLBACKS if you do not want to install fallbacks for >> +# perl CPAN modules. > > nit: Looking at this as a naive user, it's not obvious what kind of > fallbacks are meant. How about: > > Define NO_PERL_CPAN_FALLBACKS if you do not want to install bundled > copies of CPAN modules that serve as a fallback in case the modules are > not available on the system. > > Or perhaps: > > Define HAVE_CPAN_MODULES if you have Error.pm and Mail::Address installed > and do not want to install the fallback copies from perl/FromCPAN.
Hmm, a positive variable like HAVE_CPAN_MODULES is appealing.
I don't know about listing the modules, as those seem likely to change and then the comment becomes stale. It's nice to have a shorter name. I could easily go back and forth. Hopefully some other folks will chime in with preferences.
> Would this patch need to update the loader to expect the modules in > the new location?
That's a good catch. In checking how this ends up when not setting NO_PERL_CPAN_FALLBACKS, we end up installing FromCPAN at the root of $perllibdir rather than under the Git dir.
While we could probably fix Git::LoadCPAN, I doubt we want to pollute the namespace. ;) So we'll want to ensure the files get put in the right place from the start. I'll try to fix that up.
Thanks for the careful eyes, as usual.
-- Todd ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Happiness is like peeing on yourself. Everyone can see it, but only you can feel its warmth