in reply to use lib between modules
One, somewhat hackish, solution is to inspect @INC.
BEGIN { my $lib_to_use; foreach my $dir (@INC) { $lib_to_use = $dir, last if $dir =~ m!dirAAA/?$!; }; $lib_to_use =~ s!dirAAA!dirBBB!; use lib $lib_to_use; } use ModuleB;
I'm sure there's a module that does this, but I'm too lazy to look for it.
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use lib between modules
by Anonymous Monk on Feb 15, 2005 at 15:38 UTC |