There's more than one way to do things | |
PerlMonks |
A good summary of how to use Perl in shared-hosting environmentsby sundialsvc4 (Abbot) |
on Feb 20, 2008 at 17:25 UTC ( [id://669055]=perlmeditation: print w/replies, xml ) | Need Help?? |
Lots of us use Perl in shared-hosting environments where very brain-dead ancient Perl-versions are the only thing that we have readily available, and of course we aren't root and can't change anything at all about the global implementation. Here, snipped from the documentation on SOAP::Lite, is a good summary of “how to do it,” which I thought I'd share for posterity.
And now, just a few additional closing comments from me ... When you set up your web-site, you can specify a value for PERL5LIB using an Apache directive such as SetEnv. You can also, more-securely, opt to use a “honkin' big use lib statement” directly in your Perl module(s), thereby hard-coding the library search-path and ensuring that your locally-defined modules will be seen at the exclusion of all others. Also not-expressly-mentioned in this description is the fact that, when you log-in to the host, say through an ssh session, you will need a script that you can run to set-up the environment variables that you need. It may be like the set/export sequence shown above or it may be more complicated, but you definitely need to write a little script-file to do it. (I also discovered that on my host I could not use .bash_login for this purpose... and that doing so actually interfered with ssh! I have to remember to run this shell-command file upon login, before using cpan, to set up the environment for this logon-session to match the one that will be seen by the Perl handlers of the web-site.
Back to
Meditations
|
|