Unix::MyPathToInc - Add the location of the current program to @INC.
use Unix::MyPathToInc; use Unix::MyPathToInc qw(/ lib);
Add the location of the current program to @INC, or perhaps several subdirectories related to the location of $0. If used with no imports, adds the current directory to @INC, or dies. Imports can be used to name directories relative to the program location (use an import of "/" to name the directory containing $0 when using explicit imports).
Requires that the script be executable.
Using $0 to modify @INC is criminally insane from a security standpoint. Don't use this module unless you understand its consequences.
To install Unix::MyPathToInc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unix::MyPathToInc
CPAN shell
perl -MCPAN -e shell install Unix::MyPathToInc
For more information on module installation, please visit the detailed CPAN module installation guide.