newperlmonkey has asked for the wisdom of the Perl Monks concerning the following question:

I have the below scenario on Solaris 10 (both QA and Prod) in which I'm confused as to take which route and seeking help from monks here.

1) I need to modify one existing perl script say example.pl(there are 15 diff scripts running currently) to do the PGP encryption of the xml file and move to a diff directory for which I'm planning to use Crypt::OpenPGP 1.12 version from CPAN. But during installation this is asking for so many dependent modules to be installed aswell which is becoming so cumbersome and thinking there must a simpler way to do it and reached out here.

2) The default perl 5.8.4 that comes with solaris 10 is present in '/usr/bin/perl' and is not used by any perl scripts.

3) Another version of perl 5.10.1 is installed in the location '/tib/esb/Perl/bin' and a symlink is created under '/opt/esb/Perl/bin/perl' (installation is done by a diff user "perluser" and this new path is placed ahead of the default perl path) and this symlink location is referred in the shebag line of the scripts as '#!/opt/esb/Perl/bin/perl' and these scripts are invoked using cron job thru shell script which has invoking command as '/tib/company/bin/example.pl'

4) if we have to upgrade the existing 5.10.1 to 5.20.2 then we have do a thorough testing of rest of the scripts aswell which we are not going to touch and I'm afraid we dont have enough time to test all the scripts. So as a quick fix I'm thinking to install the latest version 5.20.2 in to a separate folder say '/tib/esb/Perl520' and then create a symlink and place it in '/opt/esb/Perl520/bin/perl' and then use in the shebang as '#!/opt/esb/Perl520/bin/perl' of the only one script example.pl that I'm planning on changing without effecting the other scripts. Then I wanted to invoke this script from shell command as '/tib/company/bin/example.pl' which is the location of this script on server.

5) Question - By doing this way should I expect any challenges going forward? With my approach would I be able to get what I'm looking for? It would be really helpful if someone can throw light on this.

FYI - I'm a newbie, so pls dont flame me.
  • Comment on Can Multiple perl versions coexist without effecting one another on Solaris?

Replies are listed 'Best First'.
Re: Can Multiple perl versions coexist without effecting one another on Solaris?
by stevieb (Canon) on Sep 30, 2015 at 16:33 UTC

    Welcome to the Monastery, newperlmonkey!

    Have a look at PerlBrew. It allows you to install multiple instances/versions of Perl that are mutually exclusive.

    -stevieb

      Thanks Stevie. Question - Instead of going thru the hassle of upgrading, if I can use CPAN to do the installation on Solaris 10, then all the dependent modules will be installed on to the current perl version 5.10.1 automatically correct?

      If the above statement is true, normally who does this installation in a company like a Unix admin?

        If I'm understanding you correctly, yes, when you install from CPAN, it'll install all needed dependencies, granted the Makefile.PL or Build.PL of the modules are configured with their dependencies properly (I rarely ever have issues with dependencies when installing via CPAN).

        Also, if you've got Unix sysadmins, that's who would most likely do the installs.


        For your reference Re: targetting for multiple perl versions, so that you read up about cpanm . Along with perlbrew its a hassle free way to manage your multiple perl installs. All the best

        The Great Programmer is one who inspires others to code, not just one who writes great code