perl5ever has asked for the wisdom of the Perl Monks concerning the following question:
Question: Is there a standard module which does this? It would be nice if one could write something like:use File::Basename; use Cwd 'abs_path'; BEGIN { unshift(@INC, abs_path(dirname($0).'/../lib')); };
instead of that boilerplate mess above.use rellib '../lib';
If not, has a module which does this ever been considered for inclusion as a standard module?
Naturally, such a module could be made to work like 'use lib' in that it would include arch specific directories if they exist.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding library directories relative to $0
by jeffa (Bishop) on Feb 22, 2011 at 20:57 UTC | |
|
Re: adding library directories relative to $0
by ikegami (Patriarch) on Feb 22, 2011 at 21:59 UTC | |
|
Re: adding library directories relative to $0
by wind (Priest) on Feb 22, 2011 at 21:11 UTC | |
by ikegami (Patriarch) on Feb 22, 2011 at 22:15 UTC | |
by roboticus (Chancellor) on Feb 23, 2011 at 00:18 UTC | |
by ikegami (Patriarch) on Feb 23, 2011 at 01:29 UTC | |
by wind (Priest) on Feb 23, 2011 at 18:57 UTC | |
by roboticus (Chancellor) on Feb 23, 2011 at 10:29 UTC | |
|
Re: adding library directories relative to $0
by fullermd (Vicar) on Feb 23, 2011 at 05:50 UTC |