use lib for paths relative to a module
问题 I'm having issues figuring out relative paths for use lib . Here is an example of what I am trying to do: I have a directory call foo , which contains a script named myscript.pl . myscript.pl uses a module named Mod1.pm located in a subdirectory called bar , so at the top of myscript.pl I put the lines: use lib 'bar'; use Mod1; This works fine, until I want Mod1.pm to use another module, foo/bar/asdf/Mod2.pm . If I put a use lib 'asdf' at the top of Mod1.pm this won't work because it searches