Home / Alt manpages / perl5123delta(1)

  • perl5123delta(1)
  • User command
  • linux

Read perl5123delta and Test the Perl 5.12.3 Changes

You will use perl5123delta as a focused release-note checklist, then run a small set of read-only tests against the Perl installed on this machine. The practical result is a clear distinction between behaviour introduced around Perl 5.12.3 and behaviour provided by a much newer interpreter. Allow about fifteen minutes if Perl is already installed.

This guide uses the installed perl-doc package, version 5.38.2-3.2ubuntu0.6. The manual page itself documents the change from Perl 5.12.2 to Perl 5.12.3, so its historical claims are not a description of everything in Perl 5.38.2.

1. Confirm the manual and interpreter versions

Start with ordinary, read-only checks. No elevated privileges are needed:

$ command -v perl
/usr/bin/perl
$ perl -v

This is perl 5, version 38, subversion 2 (v5.38.2) built for x86_64-linux-gnu-thread-multi
$ dpkg-query -W -f='${Package} ${Version}\n' perl perl-doc
perl 5.38.2-3.2ubuntu0.6
perl-doc 5.38.2-3.2ubuntu0.6
$ man perl5123delta

The final command opens the release note. If you are working over a terminal connection, use man -P cat perl5123delta to send it to standard output instead. A missing manual page means the documentation package is not installed; it does not mean the Perl interpreter is missing.

Checkpoint

Record the interpreter version before comparing results. A test run on Perl 5.38.2 can confirm that syntax still works, but it cannot prove that the same result was present in every 5.12.x build.

2. Read the compatibility boundary first

The page says that there were no intentional incompatibilities between 5.12.2 and 5.12.3. That is a release boundary, not a promise that old programs are compatible with every later Perl. It also tells you where to continue reading: for an upgrade from 5.12.1, consult perl5122delta as well, and for changes in 5.12.0 consult perl5120delta.

The page calls out one core feature: keys, values and each can operate on arrays. It also says this was actually introduced in Perl 5.12.0 and missed from that release's notes. Treat that wording carefully. Perl 5.12.3 is the documentation point for the change, not necessarily the implementation point.

3. Verify array iteration without changing state

Run this self-contained example. It creates an in-memory array only, prints its indexes and values, and exits:

$ perl -e 'my @items = qw(alpha beta gamma); print "keys=@{[keys @items]}\n"; print "values=@{[values @items]}\n"; while (my ($index, $value) = each @items) { print "each=$index:$value\n" }'
keys=0 1 2
values=alpha beta gamma
each=0:alpha
each=1:beta
each=2:gamma

For an array, the keys are indexes and the values are the elements. The each loop returns both at once and advances its internal iterator. The output is deterministic for this array because its indexes run from zero to two.

Do not transfer the hash mental model too literally. Array indexes are normally dense, and assigning or deleting elements while iterating can make a loop harder to reason about. If you need a stable snapshot, iterate over a copied list instead:

$ perl -e 'my @items = qw(alpha beta gamma); for my $index (0 .. $#items) { print "$index:$items[$index]\n" }'
0:alpha
1:beta
2:gamma

This second form is ordinary indexed iteration, not a test of the release-note feature. It is often the clearer choice when you need to update the array during related work.

4. Check the deparser separately

The bug-fix section says that B::Deparse can again correctly deparse no VERSION and certain constant expressions. Keep this test separate from the array test because it exercises a compiler and module tool rather than the runtime iteration feature:

$ perl -MO=Deparse -e 'no VERSION; 1' 2>&1
Can't locate VERSION.pm in @INC (you may need to install the VERSION module) ...
BEGIN failed--compilation aborted at -e line 1.
no VERSION;
$ printf 'exit status: %s\n' "$?"
exit status: 2

That is the result on this machine's Perl 5.38.2, not a successful reproduction of the old bug fix. The later interpreter treats VERSION as a module name in this source form and stops before deparsing can complete. The historical note is still useful when comparing a Perl 5.12.x build, but do not turn this test into a claim about current support.

The exact error includes the full @INC search path and may wrap differently. If you have a Perl 5.12.x build available, run the same command there and compare the exit status and deparsed statement. If the command fails because VERSION.pm cannot be found, report the missing module or version difference rather than treating it as proof that the documented 5.12.3 fix is absent.

5. Keep platform notes in their historical context

The page records fixes for Solaris, VMS and VOS. These are release notes for those platforms, not Linux configuration instructions. In particular, the Solaris note concerns building miniperl with DTrace, the VMS note concerns PerlIO and file permissions, and the VOS note concerns long file names and builds without IPv6 support.

Do not add a DTrace build flag, change PerlIO settings or alter IPv6 configuration merely because a platform note appears in this document. First establish that you are building the named platform and that the issue applies to your Perl source tree. A normal Linux package user can record these notes as upgrade history and move on.

6. Use the reporting path for a real discrepancy

If your result differs from the documented behaviour, capture the interpreter's build details and a minimal reproducer:

$ perl -V > perl-V.txt
$ perl -e 'my @items = qw(alpha beta gamma); print join q{,}, keys @items, "\n"'
0,1,2

Keep the test input small and include the exact Perl version. The manual points to perlbug for reporting an unreported Perl bug. Before sending anything, review the report for local paths, usernames, tokens and other information that should not leave the machine. A suspected security issue belongs on the Perl security reporting route named by the manual, not on a public bug discussion.

These checks do not install packages, modify Perl libraries or change a running service. If you created perl-V.txt only for a report, remove that file yourself after checking it; do not delete an existing file with that name without first choosing a different destination.

Done means

  • You confirmed the installed Perl and perl-doc versions.
  • You read the 5.12.2 to 5.12.3 compatibility statement before testing.
  • keys, values and each worked on an in-memory array.
  • You tested B::Deparse independently and understood what its output proves.
  • You treated Solaris, VMS and VOS notes as platform-specific history, not Linux commands.
  • No package, interpreter, service or persistent configuration was changed.