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

RE: pop @INC (".")

Thread Previous | Thread Next
March 10, 2012 22:05
RE: pop @INC (".")
Message ID:
> From: Kent Fredric [] 
> Sent: Friday, March 09, 2012 4:10 PM

> I think a more useful thing to do, might be instead of completely
> removing q{.} from @INC, would be replacing q{.} with a hook of sorts
> that triggers when a file would otherwise be loaded from q{.} so you
> can decide what to do with it.

It's bad idea to do in Perl core - because this is one more logic to 
implement, document and support, 
and in return you have very little benefit (IMO more damage than benefit)

But even better - if you need this logic for your own application - you can
do it as a CPAN module right today. Overload @INC with all of your
required logic, shuffle everything you need on its change - and here you go.

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