Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Back compatibility from v5.6.1 to v5.004_02

by kokoko12000 (Novice)
on Mar 02, 2004 at 18:30 UTC ( [id://333340]=perlquestion: print w/replies, xml ) Need Help??

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

Hi all, I developed a project using Perl, v5.6.1. I found out that I need to make it work with Perl, version 5.004_02. I tried to compile my application using v5.004_02, ( was developed in v5.6.1), but I get lot of errors. Can anyone give me any pointers/suggestions of how to approach this. Thanks, Vid.
  • Comment on Back compatibility from v5.6.1 to v5.004_02

Replies are listed 'Best First'.
Re: Back compatibility from v5.6.1 to v5.004_02
by ambrus (Abbot) on Mar 02, 2004 at 18:40 UTC
    1. Read the perldelta* manpages to find out the most important differences between perl versions.
    2. Go through each error and see what it says. In most cases, it should be clear what does not work.
Re: Back compatibility from v5.6.1 to v5.004_02
by fglock (Vicar) on Mar 02, 2004 at 20:08 UTC
Re: Back compatibility from v5.6.1 to v5.004_02
by freddo411 (Chaplain) on Mar 02, 2004 at 19:40 UTC
    I've been stuck on 5.005 here at work for a while.

    Here is one thing I've found:
    "our" does not work. use "use var" instead

    It is not too hard to examine each error and work the problem.

    Keep in mind that since you are obviously using two distinct and different perl installations you may be missing needed modules. This would cause you "errors" but they would not likely be related to the different perl distributions. (Yes, there are *some* included modules in 5.6 that aren't in 5.005) To fix, go to cpan.org to 'fill up' on the needed modules.

    You might consider upgrading your Perl installation. It's not as hard as you think.

    -------------------------------------
    Nothing is too wonderful to be true
    -- Michael Faraday

      use vars , not  use var. Example: use vars '$varname', '@varname'; instead of our $varname; our @varname;

      Update: single-quote vars instead of double quote.

        Watch yourself :)
        use strict; use warnings; use vars "$varname", "@varname"; __END__ Possible unintended interpolation of @varname in string at - line 3. Global symbol "$varname" requires explicit package name at - line 3. Global symbol "@varname" requires explicit package name at - line 3. BEGIN not safe after errors--compilation aborted at - line 3.
Re: Back compatibility from v5.6.1 to v5.004_02
by ysth (Canon) on Mar 02, 2004 at 23:25 UTC
    5.004_02 is a kind of funny release to be stuck on...I notice that 5.004_03 was released about a month later and 5.004_04 about a month after that; does anyone know if there were serious problems with _02 that led to such a quick followup release?

    From perlhist:

    5.004_02 1997-Aug-07 5.004_02_01 1997-Aug-12 aka perl5.004m3t1 5.004_03-t2 1997-Aug-13 aka perl5.004m3t2 5.004_03 1997-Sep-05 5.004_04-t1 1997-Sep-19 aka perl5.004m4t1 5.004_04-t2 1997-Sep-23 aka perl5.004m4t2 5.004_04-t3 1997-Oct-10 aka perl5.004m4t3 5.004_04-t4 1997-Oct-14 aka perl5.004m4t4 5.004_04 1997-Oct-15 5.004_04-m1 1998-Mar-04 (5.004m5t1) Maint. trials for +5.004_05.
      I think I fixed most of the errors. Mostly by including the missing modules and going through each error. There are two more things I have to do: 1. I have to replace "confess" keyword with "die", because it compalined "Cannot use bareword "confess" when "strict subs" is in use". Can i get the module that Confess is present. 2. My current test scripts use Test.pm file which is not supported in v5.004. Do I need to rewrite the tests again?
        confess comes from Carp, so you have to use Carp to get it.
Re: Back compatibility from v5.6.1 to v5.004_02
by kokoko12000 (Novice) on Mar 02, 2004 at 20:43 UTC
    Thanks for all your replies. I will go through the suggestions you gave me, and will let you know soon.
      Hi all, I think I fixed most of the errors. Mostly by including the missing modules and going through each error. There are two more things I have to do: 1. I have to replace "confess" keyword with "die", because it compalined "Cannot use bareword "confess" when "strict subs" is in use". Can i get the module that Confess is present. 2. My current test scripts use Test.pm file which is not supported in v5.004. Do I need to rewrite the tests again? -Sagar.
Re: Back compatibility from v5.6.1 to v5.004_02
by shirkdog_perl (Beadle) on Mar 03, 2004 at 09:00 UTC
    There are some formatting Modules that are in perl 5.6.1 that are no where to be found in perl 5.004. Also the output should tell you the modules that are missing.

    Shirkdog_perl is meditating...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://333340]
Approved by arden
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-16 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found