Devel::PatchPerl(3pm)
π Devel::PatchPerl π
okay bestie, so you know how Devel::PPPort has that buildperl.pl script that patches perl source? yeah. this is that, but modularised. that's literally the whole vibe. β¨
<h2>VERSION</h2>
version 2.14 π (yes we're on 2.14, keep up)
π SYNOPSIS
use strict;
use warnings;
use Devel::PatchPerl;
Devel::PatchPerl->patch_source( '5.6.1', '/path/to/untarred/perl/source/perl-5.6.1' );
that's it, that's the whole thing, go off π
β¨ DESCRIPTION
so Devel::PatchPerl is a modularisation of the patching code that lives inside Devel::PPPort's buildperl.pl. we took it out, gave it its own lil home, gave it main character energy. π
important tho: it does not build perls. it is not about building. it merely provides an interface to the source patching functionality. patching only. don't ask it to build. π
π«Ά FUNCTION
patch_source
- takes two parameters: a
perlversion, and the path to the unwrapped perl source for that version. - it dies on any errors. no chill, just death. π
- if you don't supply a
perlversion, it will try to auto-determine theperlversion from the path you gave it. smart girl behavior. - if you don't supply the path to the unwrapped perl source, it will assume the current working directory. lowkey convenient.
determine_version
- takes one optional parameter: the path to the unwrapped perl source.
- it returns the perl version of the source code at that location. π
- it returns
undefon error. sad but honest. - if you don't supply the path to the unwrapped perl source, it will assume the current working directory. again. consistent queen.
π§ PLUGIN SYSTEM
see Devel::PatchPerl::Plugin for the details of Devel::PatchPerl's plugin system. iykyk π
π₯ PATCHLEVEL
okay so Devel::PatchPerl will normally update the patchlevel.h file inside the perl source tree to show that it has applied local patches. cute, right?
but β and this is the plot twist β that behaviour is negated if it detects that it's operating in a git repository. π
to override that and update patchlevel.h while you're in a Git repository, set the env var PERL5_PATCHPERL_PATCHLEVEL to a true value. periodt.
alternatively, just call patchperl with the --patchlevel option. same energy, different door. π¦
π CAVEAT
Devel::PatchPerl is intended only to facilitate the building of perls. it is not intended to facilitate the testing of perls.
that means: it will not patch failing tests in the perl testsuite. if you came here hoping it would fix your broken tests, bestie, no. it won't. read the room. π
πΈ SEE ALSO
Devel::PPPortDevel::PatchPerl::Plugin
π AUTHOR
Chris Williams <chris@bingosnet.co.uk>
π COPYRIGHT AND LICENSE
This software is copyright (c) 2025 by Chris Williams and Marcus Holland-Moritz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page, you're welcome, go patch some perl source bestie π«Άπβ¨
<span>perl v5.40.1</span> Β· <span>2025-10-04</span> β that's the version and the date this whole thing was baked, mwah π byeee π
π¦ where this page comes from
- ubuntu resolute: libdevel-patchperl-perl 2.14-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdevel-patchperl-perl 2.14-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms