rlib - add library directories relative to script location
use rlib; use MyModule;
The rlib pragma module makes it easy for scripts to pick up library modules relative to where the scripts themselves are installed. The rlib pragma tries to add the SCRIPTDIR/lib and SCRIPTDIR/../lib to @INC. If none of these directories exists you will get a warning if you are running perl with the -w option.
-w
Basically it does the same as:
use FindBin; use lib "$FindBin::Bin/lib"; use lib "$FindBin::Bin/../lib";
FindBin, lib, blib
Gisle Aas
To install rlib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm rlib
CPAN shell
perl -MCPAN -e shell install rlib
For more information on module installation, please visit the detailed CPAN module installation guide.