Devel::PatchPerl(3pm)

Devel::PatchPerl3pm

Patch perl source a la devel::ppport's buildperl.pl

Usage

  use strict;
  use warnings;
  use Devel::PatchPerl;
  Devel::PatchPerl->patch_source( '5.6.1', '/path/to/untarred/perl/source/perl-5.6.1' );

Version

version 2.14

Overview

Devel::PatchPerl is a modularisation of the patching code contained in Devel::PPPort's "buildperl.pl".

It does not build perls, it merely provides an interface to the source patching functionality.

Function

"patch_source"

Takes two parameters, a "perl" version and the path to unwrapped perl source for that version. It dies on any errors.

If you don't supply a "perl" version, it will attempt to auto-determine the "perl" version from the specified path.

If you don't supply the path to unwrapped perl source, it will assume the current working directory.

"determine_version"

Takes one optional parameter, the path to unwrapped perl source. It returns the perl version of the source code at the given location. It returns undef on error.

If you don't supply the path to unwrapped perl source, it will assume the current working directory.

Plugin system

See Devel::PatchPerl::Plugin for details of Devel::PatchPerl's plugin system.

Patchlevel

Devel::PatchPerl will normally update the "patchlevel.h" file in the perl source tree to indicate that it has applied local patches. This behaviour is negated if it is detected that it is operating in a git repository. To override this and update "patchlevel.h" when in a Git repository, set the env var "PERL5_PATCHPERL_PATCHLEVEL" to a true value.

Alternatively, call "patchperl" with the "--patchlevel" option.

Caveat

Devel::PatchPerl is intended only to facilitate the "building" of perls, not to facilitate the "testing" of perls. This means that it will not patch failing tests in the perl testsuite.

Releases

8 releases since Debian 7 (Wheezy); the text changed 5 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11–13
  6. Arch

Author

Chris Williams <[email protected]>

From perl-devel-patchperl 2.14-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.