in reply to Containing 'use lib' statements in modules to their own namespace

Is there some way to restrict the scope of the use lib statements to the namespace of the module in which they were used?

Not really

if you have modules you want to override, load them before you load the others, if they use use, they won't be loaded twice

  • Comment on Re: Containing 'use lib' statements in modules to their own namespace

Replies are listed 'Best First'.
Re^2: Containing 'use lib' statements in modules to their own namespace
by Anonymous Monk on Oct 19, 2015 at 07:45 UTC
Re^2: Containing 'use lib' statements in modules to their own namespace
by lgp171188 (Initiate) on Oct 19, 2015 at 07:51 UTC

    Thanks for your reply!

    What I am trying to achieve here is to have a patched modules directory that could contain the patched versions of modules that are there in the deployed code. If there is a module in the patched library directory, it should be picked up over the one in the deployed code and if not, things should work fine with just the deployed code.

    So I am not sure how to load them before loading the others since the module names are the same and only the locations differ. Also if I load them using use, I guess I will have to run use lib before every use statement. :-/