Maintaining Perl 5 Core (Dave Mitchell): April 2022
Sun, 08-May-2022 by
Matthias Bloch
edit post
Dave writes:
This my monthly report for April on work done covered by my TPF perl core
maintenance grant.
The main thing I did last month was to fix up Deparse failures. The test
suite runner has a switch,
t/TEST -deparse
which runs each of the 3000 or so test scripts on a round-trip through the
deparser before running them as normal. This is a good general test of the
deparser, and whether there have been any regressions. I try to run this
at least once per year in the lead up to a new release to see what state
we're in. Often its just a case of adding a new test script to the
ignore file (Porting/deparse-skips.txt), but sometimes things are worse.
In this case, there were a couple of minor issues related to the new
for my ($x,$y) (...) { ...}
syntax, the new 'use builtin' pragma, and the new preserving of boolean
types.
But the main issue was that custom warning categories were no longer being
deparsed. It turned out they historically never were, until as a
side-effect of a fix a few releases ago, somewhere between 0 and 3
categories were now being processed. It just so happens that the number of
fixed categories in this release was a multiple of 4, leading to no extra
(i.e. custom) categories being deparsed. This has now been fixed so that
all custom categories will be handled, no matter how many have been
registered.
Debugging and fixing this led me down a little rabbit hole around the
warnings infrastructure - the internal details of which are badly
under-documented. As a start towards addressing this, I spent some time
refactoring regen/warnings.pl, which is used to automatically generate
warnings.h and warnings.pm based on what warning categories are defined.
That script had grown into a bit of an unworkable mess.
SUMMARY:
0:59 #19664 [doc] perlsub "Constant Functions" section out of date
1:59 #19670 \U and \L in interpolated strings don't actually stack
1:54 check for any performance regressions
19:34 fix Test -deparse failures (esp related to warnings)
10:52 process p5p mailbox
4:15 refactor regen/warnings.pl
1:23 review Coverity scan
------
40:56 TOTAL (HH::MM)
Comments (0)