perlupgradeperl-modulemod-perl2

Upgrade Perl from 5.6 to 5.24


We are currently using 5.6 version of Perl in our organisation, along with MySQL and Apache, but now the client wants to upgrade Perl to v5.24.

What are all the major changes and key points that must be kept in mind before starting an upgrade?

I surfed a lot, but I didn't find anything interesting for moving from 5.6 to 5.24.

Is it advisable to move from this much lower version to advanced level?


Solution

  • If you go to CPAN for the chosen version of you are moving to (in your case 5.24.0 Perl 5.24.0), and look down in the Documentation section there are bunch of perlXXXdelta links. These files describe the changes between revisions and more importantly they detail the incompatible changes. You can also find these online.

    Version 5.24.0 details its changes in pod/perldelta.pod.

    There are number of notable differences:

    I would suggest you go over these files in detail (it will keep you busy given your huge version bump!). This is especially the case if you have a good knowledge of your code base and the Perl features it utilizes. This should at least give you a sense of the potential pitfalls you may face in migrating to later versions.

    I would also add that Borodin's answer is worth a read, as it details a very good approach to dealing with the upgrade. I agree wholeheartedly with his recommendations, especially unit testing - it is a sure way to increase confidence in the success of the migration. If you have no unit tests, then this would be an excellent time to introduce them, as well as being able to justify the time spent creating them for your organisation.