http://www.perlmonks.org?node_id=216683


in reply to Installing Modules on a Web Server

Not everybody has the module files living in /lib. For example, my own Test::Exception has Exception.pm at the top level.

Rather that figuring out where the module lives it's easier to let perl find it for you.

  1. Create a local ~/tmp-lib directory
  2. Download and uncompress the module
  3. Do:
    perl Makefile.PL PREFIX=~/tmp-lib make make test make install

You should then find your module installed in ~/tmp-lib and can copy it to your web site as you described. You also get the advantage of running the test scripts.

If you are installing multiple modules, just repeat the make process. Everything will be installed into ~/tmp-lib and you can copy everything in one go.

Finally, if you are installing multiple modules that are dependent on each other you might want to do:

perl Makefile.PL PREFIX=~/tmp-lib LIB=~/tmp-lib

This will allow the module you are installing to find the other modules in ~/tmp-lib and run in a sensible way.