Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

version change on solaris

by krishnapriya (Initiate)
on Mar 15, 2011 at 13:58 UTC ( [id://893328] : perlquestion . print w/replies, xml ) Need Help??

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

can anyone help me on the below 1. I am migrating perl scripts from 5.8.0 to 5.8.4. Does the code works as it is. 2. is it possible to change the perl version from 5.8.4 to 5.8.0 on solaris 3. If possible, how to change the version

Replies are listed 'Best First'.
Re: version change on solaris
by marto (Cardinal) on Mar 15, 2011 at 14:06 UTC

    Why not simply install another version of perl on the machine and test your code with it? I'd suggest leaving Solaris with the version of Perl which came bundeled with, you can mess up systems by changing this sort of thing, and installing your own version of perl to another location if required. Note also that 5.8.4 is pretty old (2004). Is there a reason you have to use this version?

      As marto say to you, you can always install your version of Perl (5.8.0, if you need it) and you can run the scripts with that version.
      It is really simple, and you can do it as user (no need to be root).
      You have to download the Perl sources, and then:

      ./Configure -des Dprefix =/your_path
      make all
      make test
      make install


      Then you can run your script with /your_path/bin/perl yourScript.pl

      UPDATE: Naturally, with this method you can test the perl versions you prefer, also the most recent.
      In addition you can run multiple perl installations on your system.
      actually we are migrating application from solaris 8 to solaris 10. perl 5.8.4 is there by default. But my scripts are there in 5.8.0. I am just finding out all possible ways. Is there any possibility to downgrade the version

        You should have been more specific when asking your question, the question title and text provided suggests that you are changing Perl version on Solaris, rather than changing Solaris versions. See How do I post a question effectively?.

        Why not simply test your script? Surely this new system is going to be tested before production use? If you don't have access to the new Solaris 10 platform, follow my previous advice, install whatever version you need elsewhere in your existing system, test your script using that verson. I wouldn't consider downgrading to 5.8.0.

Re: version change on solaris
by cdarke (Prior) on Mar 15, 2011 at 14:23 UTC
    Regardless of which version you are changing to/from you will always need to run all your tests on your scripts again. You do have a complete set of tests, don't you? If you don't then now might be a good time to write them.

    You should also carry out a sequence of parallel running with both versions - there should be no problem with having two versions installed provided your #! lines and/or your PATHs are correct.

    Why so old versions? 5.8.4 is at least seven years old and there is a lot of really cool stuff in the latest releases. Many people stick with 5.8.8, and that is pretty stable, but to go for some abritary maintenance release seems strange.

      "Why so old versions? 5.8.4 is at least seven years old and there is a lot of really cool stuff in the latest releases."

      I suspect because 5.8.4 is the version installed with Solaris 10.

        Yes, looks like it, although that wasn't clear from the original post. I would still ask the same question though, particualrly if moving everything over. Just about everything has to be tested again anyhow (I'll bet there is a later version of ksh, bash, sed, gcc, etc.), so why not upgrade now?
        when i give perl -v i have got the below message This is perl, v5.8.4 built for sun4-solaris-64int (with 31 registered patches, see perl -V for more detail) Actually we are going to do all the tests. But i would to know whether there is any possibility for downgrade of perl.
Re: version change on solaris
by ikegami (Patriarch) on Mar 15, 2011 at 16:28 UTC
    Why? Is there a specific problem you are trying to fix by downgrading? Libraries built for 5.8.0 don't even need to be rebuilt for 5.8.4.
      Libraries built for 5.8.0 don't even need to be rebuilt for 5.8.4.
      I would not take that for granted on the context of a full OS upgrade.
        Absolutely right about upgrades!!

        I used flars to "upgrade" our Solaris 8 Sun Ray/ Citrix servers to Solaris 10 (i.e. I took a snapshot of one of the Solaris 8 systems, used that build a new system (with all of our stuff), upgraded the new system, and then used a flar of that to build the Solaris 10 systems. Even with tons of self-compiled code, including GCC, KDE 3.x, etc. I ran into very few problems. I do not recall having to make too many changes. I think I created the Solaris 10 flar I used was the second or third one I had created (mostly tweaking stuff).

        Of course, I did not take the "upgrade" for granted. I used the flars, set up a pilot Sun Ray/Citrix server that a few of used for a couple weeks to detect issues, etc. And because of that, the problems that we did encounter (nothing too major) were resolved before I rebuilt the new systems.

        Of course, to our users, it was a fairly smooth transition, all things considered. But they didn't see the months of effort that went into making sure things went well. Anyone that assumes an upgrade will go well, especially for a production system, deserves to get fired when -- shock of all shocks -- the upgrade doesn't go as well as expected. Don't take your upgrades (or your SysAdmins) for granted!! (^_^)

        Elda Taluta; Sarks Sark; Ark Arks

Re: version change on solaris
by salva (Canon) on Mar 15, 2011 at 14:44 UTC
    try to avoid 5.8.0 as much as possible as it was a very buggy release!
Re: version change on solaris
by mvenkatesh (Initiate) on Mar 15, 2011 at 14:04 UTC
    http://webdesign.ittoolbox.com/groups/technical-functional/perl-l/perl-scripting-in-different-versions-of-perl-4080759 go to above link...u will get the solution