Home / Alt manpages / perl585delta(1)

  • perl585delta(1)
  • User command
  • linux

Read perl585delta Without Mistaking History for Current Behaviour

You will use perl585delta to turn a Perl 5.8.5 release note into a small, reproducible compatibility check. The guide separates what changed between Perl 5.8.4 and 5.8.5 from what your installed interpreter does today. Allow about 15 minutes. You need a shell, the perl-doc package, and permission to create a temporary file in /tmp.

The installed reference here is perl-doc version 5.38.2-3.2ubuntu0.6. Its perl585delta(1) page describes the historical 5.8.5 release, while the executable on this machine is Perl 5.38.2. That difference is the main safety boundary: a current successful test confirms current behaviour, not that an old Perl binary has been reproduced.

1. Confirm the reference and interpreter versions

Start by checking that the documentation and executable are available. This is a read-only step and does not need elevated privileges:

$ command -v perl
/usr/bin/perl
$ command -v man
/usr/bin/man
$ perl -v | sed -n '1,3p'
This is perl 5, version 38, subversion 2 (v5.38.2) built for x86_64-linux-gnu-thread-multi

Read the page itself when you need the complete list of changes:

$ man perl585delta

It covers differences from 5.8.4 to 5.8.5. It does not describe the full path from 5.8.5 to 5.38.2, and it is not a general installation guide.

2. Find the changes that affect a real check

The most useful entries for a compatibility review are the ones with an observable input or output. The page records Unicode regular-expression class intersections, references between user-defined character classes, a safer charnames pragma, UTF-16 script detection, a perl -V query change, and a fix for a sort optimisation. It also records utility and module version updates, but a module version listed in an old delta page is not proof that the same version is installed now.

Make a short note of the exact claim before testing it. For example: "the 5.8.4 in-place sort omission is fixed in 5.8.5". Do not turn that sentence into a claim about every later sort implementation without checking the interpreter you will run.

Checkpoint

You should now have both versions written down: the release being described, 5.8.5, and the interpreter being tested, 5.38.2.

3. Check the diagnostic query syntax

The delta page says that perl -V accepts query-like arguments, that a trailing colon suppresses the normal line ending and terminator, and that a leading colon removes the name= prefix. These are useful when a shell script needs one configuration value. Test them without changing Perl or the host:

$ perl -V:version
version='5.38.2';
$ perl -V:version:
version='5.38.2'$ perl -V:version
$ perl -V::version
'5.38.2';

The second command deliberately leaves the prompt on the same line because its trailing colon suppresses the line ending. The third command demonstrates the leading-colon form. If you copy either form into a script, add your own separator rather than relying on the terminal prompt.

For a readable diagnostic report, use plain perl -V. For a script, capture the command's output and check its exit status. Keep the query name fixed and review it during upgrades; a typo can produce no useful value even though the command looks superficially successful.

4. Reproduce the historical sort regression check

The page gives the shape of a bug where an in-place assignment could omit the value held in another variable. Run the small example on a disposable process:

$ perl -e '@a=(2,1); $b=3; @a=sort($b,@a); print "@a\n";'
1 2 3

On this machine the value 3 is present. That is a useful smoke test for the installed interpreter, but it is not a substitute for running the affected application's test suite. Sorting may still differ when a program supplies a custom comparison block, objects, locale-sensitive data or tied values.

Do not use a production data file for this check, and do not edit application code merely to make the one-line example fit. If the check fails on an old interpreter, preserve the exact interpreter version, source data and command line in the bug report.

5. Test a BOM-marked script in a temporary file

The release notes say that Perl should detect BOM-marked and BOMless UTF-16 scripts of either endianness. A safe probe can be written to a new temporary file. This example creates a UTF-16LE file containing a short print statement and leaves the file in /tmp for inspection:

$ probe=$(mktemp /tmp/perl585-XXXXXX.pl)
$ printf '\377\376\160\000\162\000\151\000\156\000\164\000\040\000\042\000\157\000\153\000\042\000\073\000\012\000' > "$probe"
$ perl "$probe"
ok

This is only a current-interpreter probe. It does not establish that every Perl 5.8.5 build handled every UTF-16 script, nor does it test a BOMless file. Treat the temporary file as disposable test data. If you need to remove it after inspection, use the explicit path shown by printf '%s\n' "$probe" and verify the path first before deleting anything.

When a real script fails to start, first identify its encoding and inspect the first bytes. Avoid converting a source file in place until you have a backup and a reviewed replacement. A source conversion can be hard to undo if the original encoding is not known.

6. Keep utility and module notes in their historical context

perl585delta records upgrades such as CGI 3.05, Encode 2.01 and Test::Harness 2.42. Those are release notes, not commands that install those versions. Check the modules actually loaded by your program with its normal dependency tooling, and test in the same environment as the application. Do not downgrade a system module because an old delta page lists an earlier version.

The page also describes h2ph gaining limited support for C inline functions that resemble preprocessor macros. "Limited" matters: generated files may need manual adjustment, and the page warns that the produced files can require editing. Run conversion in a scratch directory and compare the output before replacing generated or checked-in files. It is a build-time operation, so it normally needs no root access.

Likewise, the debugger's backward-stepping feature is described as restarting and replaying saved command history. It is not reverse execution of arbitrary external side effects. Do not treat it as a way to undo writes, network requests or service changes.

7. Record failures with the right boundary

If a check differs from the page, record the Perl version, operating system, command, input encoding and complete diagnostic output. Separate three cases: the historical claim, the behaviour of the installed interpreter, and the behaviour required by your application. That prevents a current result from being reported as proof about 5.8.5.

For production compatibility work, run the application's tests under the oldest supported Perl as well as the current one. Pay particular attention to Unicode handling, threads, globbing, sort results and scripts with non-ASCII encodings, because those are areas called out by this release note. Do not enable threads, change boot settings or rebuild Perl just to exercise a release-note example.

Done means

  • man perl585delta was read and identified as a 5.8.4 to 5.8.5 delta.
  • The installed documentation package and Perl interpreter versions were recorded separately.
  • The perl -V query forms were tested without changing system configuration.
  • The sort example returned all three values on the installed interpreter.
  • The UTF-16 probe ran from a temporary file, and no production source was overwritten.
  • Historical release notes were kept separate from current compatibility claims.