Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
where (lib path) will differ from one installation to another. Also for various reasons I can't put ModuleA and ModuleB in the same directory. ModuleA needs to use ModuleB. In ModuleA I put:/(lib path)/dirAAA/ModuleA.pm /(lib path)/dirBBB/ModuleB.pm
What do I use for ??? I know that these are no good: # WRONG: relative to caller who could be anywhere:use lib ???; use ModuleB;
# WRONG: relative to calling script which could be anywhere:<code> use lib '../dirAAA/'
How do I specify 'relative to the current file (Module A)'? My apologies for posting anonymously; I'm having trouble logging in. thanks, Daviduse FindBin; use lib "$FindBin::Bin/../dirAAA/"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use lib between modules
by dragonchild (Archbishop) on Feb 14, 2005 at 19:07 UTC | |
by Anonymous Monk on Feb 15, 2005 at 15:38 UTC | |
|
Re: use lib between modules
by Tanktalus (Canon) on Feb 14, 2005 at 19:07 UTC |