laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The question now is why cPanel does not allow you to install (some?) modules. Without me ever using cPanel or knowing what's going on in the mind of the hosting service I would guess that the answer is "because you can mess your system very easily". You see Perl is used for some of OS maintenance and if you even upgrade system Perl or a module that system Perl relies on to be on a particular version then some things may break. But irrespective of me being correct in my guess, I would suggest that you install perlbrew (as root) and from within it your preferred Perl (e.g. the latest). Follow this guide: https://metacpan.org/pod/distribution/App-perlbrew/script/perlbrew#PERLBREW_ROOT on how to install it for many users (they have to modify their bashrc). The problem you will encounter is that your CGI scripts must be told exactly what Perl to use because they may be running under a custom user account (e.g. www). I am sure you will be able to find plenty of info on how to do this. What is suggested in the above guide is that you create a 'perlbrew' user which has write permissions to perlbrew's home dir. And whenever you want to maintain perlbrew by upgrading perl or installing a module, you must do that as 'perlbrew' user. So, now you have a Perl installed which is independent from system Perl (but not necessarily different version!). Next step is to install cpanm and use the latter for installing all the packages you need - for me it works nice and never failed me and it is high-level. Here you may want to keep a list of those packages you installed so that when you migrate you re-install all these modules (there are also ways to get the list of currently installed modules with varied mileages). The alternative is to have and use only 1 perl: system perl. Just beware that the system can do whatever they want with that perl e.g. upgrading it or its packages. The hosting service should have a snapshot feature somewhere by which you save a working state of the system and if you mess up you just load that snapshot and annul all the rogue changes you did. Whatever you do, using cpanm for installing modules saves a lot of hassle (than using the more low-level cpan command). BEWARE: with the above or just by logging as root using SSH you can mess up the system and then Christmas will really be cancelled. So: prudence, snapshots, backups. bw, bliako In reply to Re: CPAN PREFIX or INSTALL_BASE
by bliako
|
|