Home / Alt manpages / perl587delta(1)

  • perl587delta(1)
  • User command
  • linux

Use perl587delta to Check Perl 5.8.7 Compatibility

You will turn the local perl587delta manual page into a short compatibility check for Perl 5.8.7 code. 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 creating a temporary text file if you choose the optional capture step. They do not 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 does not need 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. The package version identifies the copy of the documentation, not the historical Perl release described by it.

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 as a command reference. The useful sections 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. That is a claim about the 5.8.7 release, not a promise that every later Perl will accept 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, and a collection of fixes.

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 contains nothing you need to retain. Do not put 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 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

The exact values are host-specific. In particular, a modern interpreter can report a Unicode database newer than 4.1.0. Do not use that output to claim that Perl 5.8.7 had the same Unicode behaviour. It only tells you what the current 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 output to paste into a command.

4. Test the change that affects your code

Choose a small, representative test instead of trying to prove an entire release note by inspection. For example, if the application depends on Unicode matching, 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 demonstrates 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 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 are loaded on demand and that this is transparent to programmers:

$ 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 and then use 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 that a current utility has the same option parser or generated code as the 5.8.7 utility. If the command is missing or the output does not show an option, stop and use a Perl 5.8.7 test environment before changing a production script.

5. Treat the security notes as boundaries

The document says that two debugging-code exploits in suidperl were closed, then recommends dedicated, single-purpose security tools such as sudo for new projects. This 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 can cross a privilege boundary and need an approved test host, a written rollback plan and an administrator who understands the local security policy. Ordinary users do not need elevated privileges for any command in this guide.

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 has been tested, and remove the old 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 says that obscure or platform-specific issues may not appear on a Linux build. A clean test on this host therefore narrows the risk; it does not certify 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. If the result depends on an external module, record that module version too. This prevents a newer system Perl from being mistaken for a 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 the result.