Audit the Perl 5.16.2 Upgrade Notes Before You Change Code
Before you touch code over a Perl point release, spend fifteen minutes turning perl5162delta into a real checklist. Confirm which historical release it describes, pull out the few behaviour changes it records, and test the regular-expression fix without touching system files. This machine provides the page through perl-doc version 5.38.2-3.2ubuntu0.6, while the page itself documents the old Perl 5.16.2 release.
The route
Jump straight to the step you need, or tick off Done means at the end.
You need a shell and the perl-doc package. The commands below are read-only apart from an optional temporary test file. No command upgrades Perl, recompiles it, changes configuration or sends a bug report.
1. Confirm the document and the installed Perl
Check the command path, package version and interpreter version. These are ordinary commands, no elevated privileges needed:
$ command -v perl5162delta
/usr/share/man/man1/perl5162delta.1.gz
$ dpkg-query -W -f='${Package} ${Version}\n' perl-doc
perl-doc 5.38.2-3.2ubuntu0.6
$ perl -v
This is perl 5, version 38, subversion 2 (v5.38.2) built for x86_64-linux-gnu-thread-multi
Exact paths and build details differ elsewhere. The point that matters: your running interpreter is not necessarily the release described by the manual. On this host, perl5162delta is historical reference material, not evidence that Perl 5.16.2 is installed.
Checkpoint
Read the page itself and confirm its scope:
$ man perl5162delta
Its description is specifically the difference between 5.16.1 and 5.16.2. If your upgrade starts at 5.16.0, read perl5161delta as well. Do not use this page as a complete changelog for a jump from a much older or newer Perl.
2. Record the changes that affect your review
The page reports no intentionally incompatible changes, which does not make an upgrade risk-free. It lists a small set of targeted fixes and build changes:
- Module::CoreList moved from version 2.70 to 2.76 in the 5.16.2 release.
- Configuration no longer gets confused by
lscolourisation. - On AIX, Configure adds
-qlanglvl=extc99to the compiler flags when usingxlC. - The equivalence between /\h/ and /[\h]/ was fixed.
The AIX item only matters when building that platform with its xlC compiler. The ls item concerns configuration-time discovery, not your application's output. Keep both in the release review if you build Perl from source; otherwise they are unlikely to need a code change.
Checkpoint
Save the release boundary in your upgrade notes as "5.16.1 to 5.16.2". A package manager's current Perl version is a separate fact and should not replace that boundary.
3. Test the regular-expression case in isolation
The documented bug fix concerns horizontal whitespace matching. Make a tiny test that prints a result rather than running a larger application:
$ perl -e 'for my $pattern (qr/\h/, qr/[\h]/) { print "match\n" if " " =~ $pattern }'
match
match
Both patterns match an ordinary space on the installed Perl. This verifies the syntax your current interpreter accepts; it does not recreate the historical defect in an old Perl binary. To compare releases, run the same one-liner with each interpreter explicitly selected, for example /path/to/perl-5.16.1/bin/perl and /path/to/perl-5.16.2/bin/perl. Do not replace /usr/bin/perl merely to run this test.
Use a file when a review needs a repeatable record. Create it in a temporary directory, keep the input visible, and remove it once checked:
$ test_dir=$(mktemp -d)
$ printf 'space\ttab\n' > "$test_dir/input.txt"
$ perl -ne 'print if /\h/' "$test_dir/input.txt"
space tab
$ rm -rf "$test_dir"
Warning
The final command deletes only the directory named by test_dir. Check the variable before using a destructive command in a script. If you want to keep the test record, copy it to a deliberate location instead of deleting it.
4. Handle build and compatibility traps
A successful current test does not prove every 5.16.2 compatibility detail. The installed interpreter is v5.38.2, and later releases may contain unrelated fixes. Test the application with the exact target Perl, its modules and its normal deployment environment.
Building on AIX: inspect the generated compiler command and confirm the xlC build receives -qlanglvl=extc99. That flag is an automatic Configure behaviour described by this page, not a general Linux command-line option. Do not add it to an unrelated compiler invocation.
If the issue is a suspected Perl bug rather than an upgrade check, reduce it to a small reproducer first. The manual says perlbug ships with the release and a report should include perl -V. Sending a report is an external action, so review the generated message and recipient before running it.
Security boundary
For a security issue in the Perl core, use the private security reporting route documented by the release materials rather than a public report.
Done means
- Confirmed the scope:
perl5162deltadescribes 5.16.1 to 5.16.2, not the Perl version currently running. - Recorded the changes that matter: Module::CoreList, configuration, AIX and
/\h/. - Tested the regular-expression syntax with a small, reversible command.
- Will compare exact Perl binaries when checking historical behaviour.
- Left the system interpreter, build configuration and service state untouched.