Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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
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.

    -Paul

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/MyConfig.pm first.
      That was my first thought... mkdir /.cpan: Permission denied at /usr/lib/perl5/5.8.5/CPAN.pm 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-12-28 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls