Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Need to install module, ftp access only

by Anonymous Monk
on Jul 21, 2008 at 19:29 UTC ( #699132=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

So I've got a webserver with ftp access only (no shell, no root). I need to drop WWW::Mechanize on it but using the usual unpack + cgi script wont work because Mechanize has a big dependency tree. Is there a way to do this without installing each dependency one by one?

Comment on Need to install module, ftp access only
Replies are listed 'Best First'.
Re: Need to install module, ftp access only
by jettero (Monsignor) on Jul 21, 2008 at 19:57 UTC
    If you install each dependency into an alternate dir, then you'd only have the one dir to push...

    I'm not sure that makes it any easier though. Do you have rsync or anything? I believe ftp can be made to do recursive puts, probably filezilla supports it rather well...

    I imagine you could also grep your site install directories off the @INC so CPAN'd install the dependency tree into your alternate location (once specified) automatically.


Re: Need to install module, ftp access only
by pc88mxer (Vicar) on Jul 21, 2008 at 22:16 UTC
    The usual trick is to write a CGI script which does it for you. For instance, you could try:
    #!/usr/bin/perl system("perl -MCPAN -e 'install WWW::Mechanize'");
    This will work if the install procedure can be done non-interactively. You might have to configure your ~/.cpan/CPAN/ first.
      That was my first thought... mkdir /.cpan: Permission denied at /usr/lib/perl5/5.8.5/ line 1258
        It's trying to install the module somewhere you don't have permission, so you simply need to tell the CPAN module to install it somewhere else. You can either set up an appropriate configuration file, as pc88mxer describes, or else set the PREFIX environment variable to tell the CPAN module where you want it to install the module. See Re^2: Perl module for a sample script.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://699132]
Approved by toolic
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-10-07 16:32 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (191 votes), past polls