Yes, this can be done. The trick is to build the directory structure that Perl expects but to do it under a directory that you have ftp access to. One handy way to do this is to first do the install somewhere on your local machine and then use ftp to copy the whole thing under your main directory on the remote machine.

Then all you need to do is tell Perl where to look for your custom-installed modules. You can mess directly with @INC, which is an array of the places Perl looks when asked to 'do', 'require', or 'use' a file, but it is better to use the 'use lib' pragma:     use lib "/home/mydir/modules";  # or whatever

Put this on a line before any 'use' statements that call on your newly installed modules. Perl will then include your custom directory and in any appropriate sub-directories in the list of places it looks in to find modules.

You may find suggestions that you just locally extract the needed .pm file, drop it into the same directory as the Perl script that needs it, and then just say,     use lib "."; ...and this will work in many cases. But do not do that. It works for the simple, single-module needs. But it can quickly get messy with the module hierarchies (the ones that have "::" in the name) and you are much better off to just set up the directories right and proper from the beginning.

Note that in some circumstances, setting up the directories on your machine and copying to a remote one (particularly if they are different operating systems) will not work because setting up the module involves some machine-dependent issues. The docs for some modules mention that they are 'pure Perl' which is a good sign for your purposes.

Here are some links to help with the task of setting up modules without shell access:
Install Perl Modules Using FTP Without Having Shell Access?
   (be sure to read the whole thread and associated links).
rBuild hack

I found these and other links by typing "install ftp" into the search box in the upper left of this page.


In reply to Re: Possible to install modules remotely? by dvergin
in thread Possible to install modules remotely? by Tweek

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.