Re: how to install a perl module without telnet
by Juerd (Abbot) on Mar 12, 2002 at 12:13 UTC
|
Hi All Does anyone know how to install a perl module without telnet because my hosting company doesnt allow me to telnet into their system.
Download and unpack the module on your local system. Then, copy (FTP?) the module to a directory on the server, so that Foo::Bar is Foo/Bar.pm.
If you do this in the same directory as your script, you can use it right away. If not, you'll have to modify @INC. (easiest: use lib 'path';)
Good luck!
44696420796F7520732F2F2F65206F
7220756E7061636B3F202F6D736720
6D6521203A29202D2D204A75657264
| [reply] |
|
|
That doesn't always work, especially if the module isn't pure Perl!
However, if you can run scripts (why else would you be uploading modules? :)), you can always do something whacky like create a CGI to handle all your server-side needs...
#!/usr/bin/perl
use CGI::Carp qw/ fatalsToBrowser /;
$|++;
print "Content-Type: text/plain\n\n";
system("perl Makefile.PL ...");
# etc.
... which should work if a compiler is available, but can get rather tedious; especially if you encounter a lot of errors or need to work around manual interaction.
--k.
| [reply] [d/l] |
|
|
However, if you can run scripts (why else would you be uploading modules? :)), you can always do something whacky like create a CGI to handle all your server-side needs...
If you can open sockets for listening, it's easier to get yourself a shell after all ;)
Besides, installing non-pure-perl modules on a system that you can't easily access is such a hassle I haven't even tried to figure out how it's done. Asking the system administrator to install a specific module works most of the time...
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk
| [reply] |
Re: how to install a perl module without telnet
by George_Sherston (Vicar) on Mar 12, 2002 at 12:18 UTC
|
I use the following procedure:
- Click on the link in CPAN and select "Open this file from its current location";
- Use Webdrive (an ftp client that maps remote computers as additional drives) to connect to my server;
- Drag 'n' Drop the file Module.pm to a directory on my server (say usr/www/lib;
- Insert the line use lib '/usr/www/lib' before calling the module.
Of course, if you don't have Webdrive, you wd have to save the file from the module by dragging 'n' dropping to your desktop or wherever, and then use whatever ftp client you have to upload it.
This is a pretty Windoze-oriented way to do things, and it only works for "pure" Perl modules, but when it works it's very easy.
§ George Sherston | [reply] [d/l] [select] |
|
|
What do you do if you can't use Telnet OR ftp?
I log on to the net from work and they won't allow either. All my up/downloading is done via http.
| [reply] |
|
|
katgirl wrote:
What do you do if you can't use Telnet OR ftp? I log on to the net from work and they won't allow either. All my up/downloading is done via http.
Use SSH. <evilgrin>
Seriously, I'm not sure you will be able to install Perl modules simply through http, unless you already happen to have some sort of application on the server which accepts your upload and installs as appropriate.
There are ways you could automate the task, "webbased perl installer", and an "email command installer" are first to come to mind, but all require shell access to the server, at least initially to setup the environement, if you know what I mean.
Good Luck
| [reply] |
|
|
This is not the "be all, end all" for your dilemma, but it may get you a bit closer. ;) Have a look at this node as they seem to be discussing the prospect of a web-based module installation.
| [reply] |
|
|
| [reply] [d/l] [select] |