using one installation of perl from many machines
Posted by kejones (kejones), 23 November 2004Hi,
We have 15 or so different linux boxes all with perl installed locally. We also have 3 main groups of users, and one group has installed yet another version of perl in a communal directory for their use only.
I need to write an application that is usable by *all* users whatever their group permissions and whatever machine they are on. The application needs modules that are not in the default installation and therefore not on all of the machines.
Can I get a perl script to use libraries in the default location on another machine? For instance, can I keep one machine up to date and get all perl programs to use that version without the user having to be logged onto that machine?
Any suggestions for simplifying the maintenance of perl across the network?
Posted by admin (Graham Ellis), 23 November 2004My first thought would be to use Samba or NFS mounted file systems (or otherwise shared disc space) to give access to all machines .... and my second thought would be to use some scripts such as those the CPAN itself uses to update mirror copies on multiple machines. I understand those scripts are available as a CPAN download. Third thought is to copy around everything special that's needed with the program.
Which of these approaches you go for will depend of factors like robustness needed, network traffic issues, whether you can be sure that all machines will be on line when your script has to run, etc. With a single crossmounted copy it's easy to maintain the copy, but a bit of a mess if the vital system goes down. At the other extreme, you've got to ensure that all your users have an up to date copy of your distribution.
Do you have a mixture of operating systems, or are the systems all Unix / all Linux / all Windows? Are the any things / modules which are system specific?
A couple of pointers / reminders:
$^O tells you the operating system name so that you can have you code switch depending on the OS
The @INC list controls where code is loaded from. You can modify it in a BEGIN block in your code if you want to add a standard module location.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho