Perl 5 Porters Mailing List Summary: September 27th - October 4th
Hey everyone,
Following is the p5p (Perl 5 Porters) mailing list summary for the past week. Enjoy!
September 27th - October 4th
Bug reports and bug fixes
Storable's tests don't seem to be able to run in parallel, as Perl #126213 points out.
James E. Keenan suggests moving forward on the patch by Tony Cook
to address Perl #126084
fixing the do undef
problem Ricardo Signes raised.
Konstantin Kokin reported in
Perl #126224 apparent
slowness in IO::Socket::INET
when testing with ab.
Paul "LeoNerd" Evans suggested it might have to do with DNS queries (which
Konstantin rejected) and ventured that
IO::Socket::IP might do better.
Mark Overmeer mentioned that playing with ab
parameters, especially -c
,
provided a positive change, meaning it might have to do with ab
itself.
He also suggested DNS indeed could be related.
Zhenyi Zhou opened
Perl #126229,
explaining that POSIX's strerror
clears
the value of $!
. It was reduced further by Zhenyi and Dave Mitchell to:
$! = 29;
{ local $! = $! }
print "[$!]\n"; # prints "[]"
In Dave's words:
Its a messy interaction between local() and magic vars. I'm not sure it can be fixed.
Ed Avid raised
Perl #126239,
addressing File::Glob's confusing
documentation regarding the GLOB_NOCHECK
option.
Bulk88 provided a patch in
Perl #126242 to fix
a compilation error when using NO_HASH_SEED
in combination with the
default hash algorithm (PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
), existing
since 5.17.10.
Todd Rinaldo provided a patch in
Perl #126244 to
remove B::Section
, as Todd describes:
This package is a vestigial reminant of B::C's removal [...]
Regex bugs
Victor Adam is continuing his quest for finding weird Regexp bugs and raised Perl #126222, finding a problem with:
print /(?(?!)(?{print "Yes"})|(?{print "No"}))/
This was fixed by Yves Orton just a few days later in 6625d92602279361acd0c6185b78c6d201fd81e0.
Victor also raised Perl #126253, expecting perl to die when seeing the two following regexp patterns:
/.{1}??/
/.{1}?+/
And following up on one of his ticket, Victor, he also whipped up a
patch to fix
Perl #126181
(a bug he opened the week prior), handling \c
inside (?[])
.
Fuzzing to find bugs
In this week's portion of "bugs dicovered by fuzzing", Dan Collins opened Perl #126257, reduced to:
0/x$0my@m:d
and Perl #126258, derived from:
grep$0,0}
and Perl #126260, caused by:
/0\G|0+|/>>s>>\x{100}>>s>>>g/0
and Perl #126261, caused by such a nasty regexp, I cannot even include it. :)
Discussions
Supporting qr/\p^L/
Following the conversation on \p
with a space, Karl Williamson
asked for comments
regarding \p
(the syntax for named Unicode properties) with a following
caret (^
) symbol. One suggestion is not supporting it, the other is
making it the same \P
. This would mean that:
qr/\p^L/
would be the equivalent of:
qr/\PL/
- Aristotle Pagaltzis asked why have one support the other.
- Abigail supported throwing an error.
- Ricardo Signes agreed.
- Eric Brine provided a few points in favor and many against, summarizing he also doesn't like it.
Remove unused define
s in perl.h
Karl Williamson also raised
Perl #231533 a few
define
statements in perl.h
which he suggests to remove. According to
Karl, they currently aren't in used in Perl core, in CPAN, probably by
anyone else, and they are wrong on EBCDIC platforms.
$SIG{__WARN__}
and PL_warnhook
can have different values
Max Maischein opened
Perl #125439
discussing the ability of $SIG{__WARN__}
and PL_warnhook
to have
different values, which he thinks is similar to the (patched by him)
behavior of $$
.
For example,
PerlIO_find_layer
assigns directly toPL_warnhook
without updating$SIG{__WARN__}
, and buggy XS modules could do the same.
Max suggests picking up Coro's
implementation which always write+read PL_warnhook
, analogous to
$SIG{__DIE__}
.
If this was indeed embraced, Coro could eliminate its workaround for patching the magic vtable entries.
Dave Mitchell supports the proposition.
Max is now working on a patch.
WinCE smokes and the problem with CPAN smokers
Ricardo Signes was wondering on the ability to receive semi-regular smoke reports of WinCE.
Bulk88 noted the different considerations in WinCE which make it difficult to test: WinCE Perl cannot redirect stdio easily, PP system() not available, the console window itself is drawn by perl using a 3rd party library(!), no shell process.
Bulk88 also suggested a way to allow testing on WinCE by transporting the reports to a different machine that will process them.
Aristotle Pagaltzis explained that it is possible that the standardization of CPAN smoke testers, which made it very simple to set up smokers, actually works against our favor since they are created in a similar way, thus lending to the "monoculture" situation of smoker set ups being too common and not varied enough.
The %!
hash
Following last week, Felipe Gasper stressed the point that, if we don't
document how %!
should be used people might use it in a way that works
but isn't intended, and which might change.
How to use it:
if ( $!{'NOENT'} ) { ... }
How not to use it:
if ( $! == $!{'ENOENT'} ) { ... }
Ricardo Signes introduced 3b90fd9 to address this.
Turning compile-time warnings off for good
Sam Kington raised a problem they're having at work while upgrading to
a perl 5.20.3. Using smartmatch extensively, warnings are beginning to
mount up. Using no warnings 'experimental::smartmatch'
handles the
warnings until they load any module that introduces all warnings again,
such as Moose or
Dancer (or
Dancer2).
Unfortunately perl has no way to prevent a different module from importing warnings into your namespace after you've adjusted them to your satisfaction.
Several offers were made, but at the end of the day, Zefram concluded that the only way to handle this properly would be in the modules themselves.
Sawyer X (me) introduced a change into Dancer 2, which David Precious will adapt to the feature-frozen Dancer 1, to allow importing Dancer without the additional pragmas it provides:
use strict;
use warnings;
no warnings 'experimental::smartmatch';
use Dancer2 ':nopragmas'; # does not reimport
perl's AUTHORS file
In an earlier thread (stemming from
Perl #126057, a
problem with the pending-author.t
test), Dave Mitchell wondered whether
we should still be maintaining an AUTHORS file instead of simply using
Git's history.
There were objections from James E. Keenan and Abigail, expressing that maintaining the file has little overhead and both helps a way to honor contributors and is needed in case contributors do not have a perl git repository available for their contribution. It was decided to keep it then.
Process of using undocumented globals
Karl Williamson provided a patch to clarify the process of using undocumented globals. In short:
One should send email to p5p first to get the go-ahead for documenting and using an undocumented function or global variable.
News
Grant report and major speed-up
Dave Mitchell provides his #98 and #99 grant reports.
The highlights include working on making EXTEND
and MEXTEND
(macros
for growing the stack) more robust against count truncating and wrapping
(derived from
Perl #125937,
mentioned in last week's summary) and optimizing the Boyer-Moore string
finder (used in regexps and index
).
The latter is an important speed improvement, as explained by Dave:
On my glibc linux x86_64 systems, this code is now 7 times faster:
$s = "a" x 1000 . "wxyz";
$s =~ /wxyz/ for 1..30000;
The commit includes the fascinating details.
Follwing this work, Aristotle Pagaltzis revealed index
to still be
faster, opting Yves Orton to suggest there's further optimization to be
achieved on this.
Lexical topic removed!
Father Chrysostomos provided a branch to remove the lexical topic variable
my $_
. It was rebased and merged by Ricardo Signes with the help of
Dagfinn Ilmari Mannsåker.
If you have any code that runs my $_
, please update it, since the
feature will officially be removed in perl 5.24.
Leave a comment