so that the following "use" calls will work. Well, that's a problem, because even though I can get a CVS view of the tree in /our/local to make changes, I can't "prefer" my local view. Until I did this...use lib "/our/local/lib";
use lib "/our/local/lib"; BEGIN { no strict; # off with the handcuffs, I say no warnings; my $old_lib_import = lib->can("import") or die; *lib::import = sub { my $self = shift; my @args = grep $_ ne "/our/local/lib", @_; if (@args) { # ok, they want something else $self->$old_lib_import(@args); } }; } use lib "/home/merlyn/project/lib"; # now put mine ahead of /our/local +/lib
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: add defang wrapper to "use lib"
by ambrus (Abbot) on May 11, 2005 at 15:29 UTC | |
by merlyn (Sage) on May 11, 2005 at 15:39 UTC |