tags:

views:

75

answers:

4

I have a server that I can ssh into but that's it. Otherwise it is totally closed off from the outside world. I'm trying to deploy some scripts I wrote to it but they have several Perl dependencies (Params::Validate, XML::Simple, etc.) I can't get them via yum since our satellite server doesn't have those packages and the normal CPAN install won't work either since the host is so restricted. Moving the module sources over and compiling is extremely tedious. I've been doing that for over a day, trying to resolve dependencies, with no end in sight. Is there any way around this? Any help is greatly appreciated.

+2  A: 

See this, it explains multiple methods that you can use to get CPAN modules into production.

Daenyth
This link doesn't really address the "I can't use CPAN because my server is wearing a chastity belt" issue.
mobrule
Yeah that'd be nice. I'm wondering if there isn't a way to somehow get the files CPAN needs, SCP them over the the server and then get CPAN to do it's thing.
Mark C
Generally, CPAN needs a reasonably complete development environment and it might be more hassle to set that up.
Sinan Ünür
Assuming you have a machine similar to the host, you could prepare them locally and transfer them over.
Daenyth
+5  A: 

If you can, set up a parallel system as close as possible (as far as architecture, and perl version) to your closed system, and install all your dependencies there into a separate lib directory using local::lib. Then you can simply scp over that directory to your closed system, and again using local::lib (and setting up some environment variables), your code will be able to utilize that directory.

Ether
I'm in the middle of trying this and so far it looks good. I'll update with the results.
Mark C
The local::lib module is sweet. Looks good. Thanks!
Mark C
+1  A: 

If you can change your hosting provider, this would be a good time to switch ;-) (I personally think Linode rocks!).

Assuming that is not the case, you can try to go with the option of setting a parallel system as @Ether suggested.

On the other hand, if the modules you are using and their dependencies are pure Perl modules, you should be able to use PAR::Packer to package your script and its dependencies and scp a single file over to the host.

Sinan Ünür
You mean PAR::Packer? App::Packer::PAR is just internals.
tsee
@tsee Argh! Thank you for the correction.
Sinan Ünür
+1  A: 

Have you tried cpan minus? If not, here's how to get it.

curl -L http://cpanmin.us | perl - App::cpanminus

You can use it with local::lib. :-D

Chromatic has a great post on how to even get a newer(and multiple) version(s) of perl onto a restricted system.

J.J.