>>Assuming the various versions of Perl weren't configured by monkeys typing random characters,
Unfortunately, that's the way it's been for all of my clients. :)
Also, I need to have a central repository for the custom libraries. It's not a good idea to take on the maintenance
of updating code on 11 platforms if you do not have to.
My system was initially setup for a hybrid environment of
5.005_03 and 5.6.1. I have to reference some custom libraries that were written for 5.005_03. Furthermore, I
have to backup to make sure my system fully supports 5.005_03 on all 11 platforms.
Note: The system is centrally located, so any changes on the UNIX/Linux side of the house will affect all of those platforms.
After making changes on aix due to referencing higher versions IO 5.6.1 library problems, my system started working correctly on Perl 5.005_03. Solaris is still running Perl 5.6.1. That is all it has installed. Other than the old Perl executable I previously mentioned.
So,when I tried running the same code on Solaris, it barfed
because of the Perl 5.6.1 system is expecting Perl 5.6.1 versions of IO to be in PERL5LIB. Perl is in many different
locations on the various UNIX/Linux platforms, but in the
same place for the 5 Windows + Netware platforms.
One question is can I have Perl switch on the libraries on the fly with a BEGIN statement? Something like:
use Config; $PLATFORM = $Config{'osname'}; if (($PLATFORM =~ /^MSWin32/i) || ($PLATFORM =~ /^solaris/i)) { # use Perl 5.6.1 libraries BEGIN { @PERL_SHARE = ( "/foo/custom/perl/lib/Custom_mods5.6.1", ); unshift(@INC, @PERL_SHARE); }; } else { # use Perl 5.005_03 libraries BEGIN { @PERL_SHARE = ( "/foo/custom/perl/lib/Custom_mods5.005_03", ); unshift(@INC, @PERL_SHARE); }; }
-P0w3rK!d
In reply to Re: Re: How to handle Cross-platform Perl, modules, and versioning
by P0w3rK!d
in thread How to handle Cross-platform Perl, modules, and versioning
by P0w3rK!d
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |