develooper Front page | perl.perl5.porters | Postings from March 2012

Re: pop @INC (".")

Thread Previous | Thread Next
David Golden
March 8, 2012 12:10
Re: pop @INC (".")
Message ID:
On Thu, Mar 8, 2012 at 2:38 PM, Todd Rinaldo <> wrote:
> We're planning on patching "." out of the @INC path for the perl we're about to build and distribute. I'm finding this change causes the test suite to blow up in all sorts of interesting ways.
> My Question: Would you consider it a bug that items in the perl test suite assume that "." is in the @INC path?

No and yes.  No because it's never been a problem in the past and yes
because it's generally done for convenience rather than need and
starting @INC is outside the control of modules and thus fragile to
depend upon.

At a minimum, I anticipate problems because it's there by default
(except under taint mode) and some CPAN modules assume it exists and
can be used to load modules directly from t/whatever during testing.

  $ ack 'use t::' -l ext dist cpan

That finds XS-APItest, arybase, CPAN-Meta-YAML, Time-HiRes, and
HTTP-Tiny.  (Yay, I'm only 20% of the problem directly and
CPAN-Meta-YAML just tracks YAML::Tiny, so not really my fault).

Even if those were "fixed", such a Perl would probably break many more
modules on CPAN, which may or may not be an issue for your intended
use of such a patch..

Put differently, imagine you were to patch Perl to always run in taint
mode.  Would it be a bug if modules/programs broke?  Modules should be
taint-safe, but many weren't ever designed to be.  Is the benefit
worth the cost?

I see no problem insisting that modules in the Perl core not depend on
having "." in @INC, but I do caution that it could have far-reaching

-- David

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