Re: Perl Upgrade with Redhat Linux OS Upgrade
by roboticus (Chancellor) on Sep 26, 2019 at 13:28 UTC
|
shijith:
You've already gotten some good advice, I'll just toss in one thing I didn't see yet:
Be sure to ensure that you keep the version of perl used by your operating system separate from that used by your application. That way you can more easily avoid surprise failures when applying security upgrades to your OS or installing new modules for your application.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
| [reply] |
Re: Perl Upgrade with Redhat Linux OS Upgrade
by marto (Cardinal) on Sep 26, 2019 at 09:28 UTC
|
"What are all the major changes and key points that must be keep in mind before starting an upgrade."
It sounds like a good time to start your research. The latest 5.24 release is 5.24.4, that that isn't the most recent perl version. 5.24.4 history/changes is a good place to start. A sane strategy would be to fully test your application(s) thoroughly on the target OS/Perl version.
| [reply] |
|
| [reply] |
|
You could cat them all together if you think that would help? Or on the target OS, with the target Perl version, run all your test suites, examine the outcome.
| [reply] |
|
|
|
|
You can use find:
find /path/to/the/scripts -name '*.pl' -exec perl -wc {} \;
perl -wc is to check the syntax of the scripts. They should give "OK" back, but that is not a guarantee to run correctly, though; only that the libraries are found and the syntax is ok according to Perl.
This only works if the perl scripts have the .pl extension (which is not mandatory).
| [reply] [d/l] |
Re: Perl Upgrade with Redhat Linux OS Upgrade
by 1nickt (Canon) on Sep 26, 2019 at 10:10 UTC
|
Hi, given that the customer wants to also upgrade the OS I recommend doing that first on a test machine. Then see whether the application works as-is on the system Perl that is installed with the RedHat version you use. Next, install Perlbrew and use it to either try with the Perl version you want to use, or fall back to 5.8 and work from there.
As others have said, if you do not have a comprehensive test suite that can prove your application has not broken (as far as you know), you should develop that first before attempting any upgrades to anything. Hope this helps!
The way forward always starts with a minimal test.
| [reply] |
Re: Perl Upgrade with Redhat Linux OS Upgrade
by FreeBeerReekingMonk (Deacon) on Sep 26, 2019 at 20:21 UTC
|
Headsup: Focus on *.pm used libraries.
Usually with big Perl programs, they "use" libraries, that sometimes are not backwards compatible, or suddenly cease to exist after the upgrade. Or are not available for your new perl version. so check if you did not forget any library. Perl Libraries are also sometimes NOT written in pure perl, but in C (or C++) for speed (through a method called XS). So on this totally new RHEL7, you need to make sure these are there too. And copying them over is sometimes possible, sometimes not. (hopefully all your libraries are on CPAN and not in-house)
What I would do is an strace perl myperlprogram.pl and see what files are being used. There are better tools, like PrereqScanner but those need to be installed, and your machines probably do not have access to Internet, thus no access to CPAN (but if you do, it is as simple as: cpan Perl::PrereqScanner)
Also check the old version to make the new perl behave like it is an older perl (use VERSION). This is handy when your new perl does not want to run the old perl code because there is a bug, and that bug worked fine in the older perl. | [reply] [d/l] [select] |
Re: Perl Upgrade with Redhat Linux OS Upgrade
by Anonymous Monk on Sep 26, 2019 at 09:37 UTC
|
Install perl 5.20 in a home directory and run test suite for every program your client eants( Perlbrew).
Write a test suite if not have one.
Read perldeltas and equivalent redhat changes/migration document
| [reply] |
|
| [reply] |
|
| [reply] |