On Sun, 15 Jun 2014 20:37:55 +0200 drupsspen <drupss...@gmail.com> wrote: > I'm building an application in Perl and is looking into using a build > system for it. So far I've looked at ExtUtils::MakeMaker. I have > divided my application like this: > > bin/foo > lib/Foo/Bar.pm > lib/Foo/Baz.pm > > The user runs the program by invoking foo, which is an executable > defined in EXE_FILES. Most of the application is however located in > lib/Foo and is imported by foo. > > The problem that I have is that I want to allow the user to install > the program in any directory by specifying PREFIX=/some/path when > running my Makefile.PL. It won't find the installed modules from lib > unless it's installed in a path where perl already looks for them. So > what I need is a way to make foo tell perl where to look for modules. > > Is there a way to do this?
You want "use lib" - in particular, to say "look in a directory named lib, under the current directory", you can say just: use lib './lib'; (in fact, "use lib 'lib'" would be enough, but I think it's mildly clearer with the ./ notation) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/