You may be able to simply upload a module.pm file for very simple modules. It will depend on the dependencies the module has on the system. If it is completely self-contained, it may work. I don't think there will be many that will work that way.
For most modules,
I think you'll need to be able to 'build' the module on the system on which it will run. You can usually build a local copy of a module in your home directory with a --PREFIX argument to the ./configure step(see the READMEs). If you have command line access via ssh or telnet, then you can do local builds of the required modules and then employ the 'use lib' trick you refer to in your question.
If you can't get to the machine to do the 'local' builds, your options are:
- get with your provider about installing the modules
- get with your provider about getting ssh access
- get another provider
- do without the modules 'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
If you do want to install a module with no prohibitive dependancies (and there are a few - things like date manipulation libraries tend not to rely too much on other modules) and you can upload it to the server, you will probably need to[tt]
push @INC, '/path/to/upload/directory';
require module;
module::import();
[/tt]rather than[tt]
use module;
[/tt] so that perl knows where to find it. "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk
What server type. On UNIX you can install modules anywhere with this telnet command.
perl -MCPAN -e shell
install module 'mymodule'
Now if you are blocked from installing to default location you can edit the MyConfig.pm located in a hidden directory.
Usual path is something like this
/home/yourdirctory/.cpan/CPAN
After you telnet into server do this
ls
cd ./.cpan
ls
cd ./CPAN
ls
If you see your MyConfig.pm file at any point goto CPAN and read the documentation on installing modules.
The MyConfig.pm file has a MakeFileARG parameter that you can set a directory you create.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.