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

RE: pop @INC (".")

Thread Previous | Thread Next
From:
vadim.konovalov
Date:
March 10, 2012 22:05
Subject:
RE: pop @INC (".")
Message ID:
35BF8D9716175C43BB9D67CA60CC345E3A6B3195@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com
> From: Kent Fredric [mailto:kentfredric@gmail.com] 
> 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.

Regards,
Vadim.
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About