Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Restricting @INC for specific application need

by sundialsvc4 (Monsignor)
on Mar 07, 2008 at 21:59 UTC ( #672897=note: print w/ replies, xml ) Need Help??


in reply to Restricting @INC for specific application need

I take it that you have not yet stumbled-upon use lib ...?

Anyway, when you do, this is probably going to be what you want. I would have one directory for application-specific modules, another for CPAN-overrides, and in the main-programs of your application simply list them both in a use lib declaration.

Perl will search the libraries declared here, in order, before it walks down the @INC list... (I've got several deployed apps where I'm having to override CPAN-modules that are seriously-broken, and the owners of those modules continue to “upgrade” them without fixing the bugs. I will not name them here.)


Comment on Re: Restricting @INC for specific application need
Re^2: Restricting @INC for specific application need
by naikonta (Curate) on Mar 08, 2008 at 08:07 UTC
    I didn't use use lib because it only prepends dir parameters to @INC, while my need is to override @INC completely by setting it manually. But yes, I should have mentioned this in the first place.

    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2014-07-10 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (216 votes), past polls