Loading libraries from custom locations

When you run a Perl program it looks for libraries (aka modules/packages/classes/dependencies) in the paths specified in $PERL5LIB before looking in the standard library.

$ echo $PERL5LIB

To load a library from a custom location modifying your $PERL5LIB environment variable. For example, to always load dependencies from the lib directory in your current project:

$ export PERL5LIB=./lib:$PERL5LIB
$ echo $PERL5LIB

Note that order is important.