Home / Alt manpages / perl587delta(1)

  • perl587delta(1)
  • User command
  • linux

Check Perl 5.8.7 Compatibility with perl587delta

Turn the local perl587delta manual page into a compatibility check instead of trusting a version bump on faith. The result is a record of what changed between Perl 5.8.6 and 5.8.7, which claims still apply to the interpreter on this machine, and which need a test on an actual old runtime.

Allow about 20 minutes. You need a shell, the perl-doc package, and a Perl installation to inspect. The commands below are read-only except for one optional text-capture step, and none of them install Perl, alter its configuration or run a setuid program.

1. Confirm the document and the interpreter

Start with the installed manual page. This is an ordinary command and needs no sudo:

$ command -v perldoc
/usr/bin/perldoc
$ perldoc -t perl587delta | sed -n '1,18p'
NAME
    perl587delta - what is new for perl v5.8.7

DESCRIPTION
    This document describes differences between the 5.8.6 release and the
    5.8.7 release.

If perldoc cannot find the page, check the package rather than guessing at a path:

$ dpkg-query -W -f='${Package} ${Version}\n' perl-doc
perl-doc 5.38.2-3.2ubuntu0.6

Your package version will differ. That version identifies the copy of the documentation, not the historical Perl release it describes.

Checkpoint

Record both facts separately. perl587delta describes Perl 5.8.7, while the executable you will test may be a much newer Perl.

2. Capture the historical change list

Read the page as a release checklist, not a command reference. The sections worth your time are the incompatible-change statement, core enhancements, module versions, utility changes, bug fixes, diagnostics and known problems:

$ perldoc -t perl587delta | sed -n \
  '/^Incompatible Changes$/,/^Reporting Bugs$/p'

The page says there are no changes incompatible with Perl 5.8.6, a claim about the 5.8.7 release rather than a promise that every later Perl accepts every old program. It also records:

  • The Unicode Character Database moving from 4.0.1 to 4.1.0.
  • A smaller Config.pm.
  • New find2perl options.
  • A collection of bug fixes covered in the sections below.

For a ticket or code review, save a plain-text copy so someone else can see exactly what you read:

$ perldoc -t perl587delta > /tmp/perl587delta.txt
$ wc -l /tmp/perl587delta.txt
<line count varies> /tmp/perl587delta.txt

This temporary file is disposable: remove it after the review with rm -- /tmp/perl587delta.txt if it holds nothing worth keeping. Do not park a generated copy in a shared project directory unless the project wants historical documentation checked in.

3. Separate historical facts from local facts

Inspect the interpreter that will actually run the application. These commands are safe and report version and build information:

$ perl -e 'printf "perl %vd\n", $^V; print "arch: $Config{archname}\n"' \
  -MConfig
perl 5.38.2
arch: x86_64-linux-gnu-thread-multi
$ perl -MUnicode::UCD -e 'print "Unicode database: ", Unicode::UCD::UnicodeVersion(), "\n"'
Unicode database: 15.0.0

These values are host-specific, and a modern interpreter can report a Unicode database far newer than 4.1.0. Do not use that output to claim Perl 5.8.7 had the same Unicode behaviour; it only tells you what today's executable provides.

The same distinction applies to modules. The delta page lists versions shipped with 5.8.7, such as CGI 3.10 and File::Temp 0.16. Check the runtime module when compatibility depends on it:

$ perl -MCGI -e 'print "CGI $CGI::VERSION\n"'
CGI <installed version>

Replace the angle-bracketed output with the real result in your notes; it is a placeholder, not literal text to paste into a command.

4. Test the change that affects your code

Pick a small, representative test instead of trying to prove an entire release note by inspection. If the application depends on Unicode matching, for example, test the exact input and regular expression it uses:

$ perl -CS -e 'my $text = "café"; print "match\n" if $text =~ /\N{LATIN SMALL LETTER E WITH ACUTE}/'
match

This shows that the selected interpreter can compile and run that Unicode expression. It does not recreate the Perl 5.8.7 tables, so run the same test under the old runtime if the release boundary actually matters.

If the change concerns Config.pm, inspect the values your program actually reads rather than measuring the module file. The release note says infrequently used values load on demand, transparently to the programmer:

$ perl -MConfig -e 'print "$Config{osname} $Config{archname}\n"'
linux x86_64-linux-gnu-thread-multi

That command verifies access to two configuration values on this installation. It cannot establish the memory or parsing saving reported for the 5.8.7 implementation.

For a utility change, check the utility's own help, then test against a disposable input tree. The page specifically names -iname, -path and -ipath for find2perl:

$ find2perl --help 2>&1 | sed -n '1,24p'
<help output depends on the installed find2perl>

find2perl is not installed on this host, so treat that block as conditional. Do not assume a current utility shares the option parser or generated code of the 5.8.7 utility. If the command is missing or the output does not show an option, stop and use a real Perl 5.8.7 test environment before changing a production script.

5. Treat the security notes as boundaries

The document says two debugging-code exploits in suidperl were closed, then recommends dedicated, single-purpose security tools such as sudo for new projects. That is guidance about reducing risk, not an invitation to enable setuid Perl.

Do not make a Perl binary setuid, run an unknown script through suidperl, or weaken a service account just to reproduce the note. Those changes cross a privilege boundary and need an approved test host, a written rollback plan and an administrator who understands the local security policy. No command in this guide needs elevated privileges.

If an old application still relies on suidperl, document the dependency first, then plan a migration to a narrowly scoped privilege mechanism. Keep the old path available until the replacement is tested, and remove the setuid path only through your normal change process: there is no universal undo command for a permission or service change.

6. Record known limits before signing off

The page records a known problem with Unicode strings returned from overloaded operators and platform-specific failures on UNICOS. It also warns that obscure or platform-specific issues may not surface on a Linux build, so a clean test here narrows the risk without certifying every supported platform.

For each relevant note, record four items: the historical statement, the Perl version tested, the exact command or test case, and the result. Record the module version too when the result depends on one, so a newer system Perl never gets mistaken for a genuine Perl 5.8.7 compatibility test.

Done means

  • You read the installed perl587delta page and confirmed the package version.
  • You recorded the difference between the documented Perl 5.8.7 release and the local interpreter.
  • You tested the specific Unicode, module, configuration or utility behaviour your code needs.
  • You did not infer historical behaviour from a modern Unicode database or module version.
  • You treated suidperl as a security migration concern, not a routine test command.
  • Your compatibility notes include the runtime version, test command and limits of each result.