Why can't I simply copy installed Perl modules to other machines?
Posted
by pistacchio
on Stack Overflow
See other posts from Stack Overflow
or by pistacchio
Published on 2010-04-21T11:57:17Z
Indexed on
2010/04/21
13:13 UTC
Read the original article
Hit count: 274
Being very new to Perl but not to dynamic languages, I'm a bit surprised at how not straight forward the manage of modules is.
Sure, cpan X
does theoretically work, but I'm working on the same project from three different machines and OSs (at work, at home, testing in an external environment).
- At work (Windows 7) I have problem using
cpan
because of our firewall that makes ftp unusable - At home (Mac OS X) it does work
- In the external environment (Linux CentOs) it worked after hours because I don't have root access and I had to configure
cpan
to operate as a non-root user - I've tried on another server where I have an access. If the previous external environment is a VPS and so I have a shell access, this other one is a cheap shared hosting where I have no way to install new modules other than the ones pre-installed
At the moment I still can't install Template under Windows. I've seen that as an alternative I could compile it and I've also tried ActiveState's PPM but the module is not existent there.
Now, my perplexity is about Perl being a dynamic language. I've had all these kind of problems while working, for example, with C where I had to compile all the libraries for all the platform, but I thought that with Perl the approach would have been very similar to Python's or PHP's where in 90% of the cases copying the module in a directory and importing it simply works.
So, my question: if Perl's modules are written in Perl, why the copy/paste approach will not work? If some (or some part) of the modules have to be compiled, how to see in CPAN if a module is Perl-only or it relies upon compiled libraries? Isn't there a way to download the module (tar, zip...) and use cpan to deploy it? This would solve my problem under Windows.
© Stack Overflow or respective owner