You can't use a module without making the code accessible to Perl in some way. So this all depends on what you mean by “install”.
If your Perl module has a modulename
.pm file, then you can include it with:
This will search for modulename
.pm on every directory listed in @INC, in turn.
So all you need to do to install a module is add the path to the module to @INC:
unshift @INC, "/path/to/module/";
You need to put the code to modify @INC in a BEGIN block in order for it to be changed before the use statement.
If your module name contains :: then the .pm file lives in a sub-directory; you need to put the parent of the sub-directory into @INC. (e.g. if your module is named Test::Module and is in /home/testuser/perl/test/module.pm then you would want to add "/home/testuser/perl/" to @INC).
You can also modify the search path on the command-line rather than in a BEGIN block:
perl -I'/path/to/module/' …