Blog:
http://blogs.perl.org/users/sawyer_x/2015/10/perl-5-porters-mailing-list-summary-september-27th---october-4th.html
Twitter: https://twitter.com/perl5summaries/status/651041624869498881
September 27th - October 4th
Bug reports and bug fixes
[1]Storable's tests don't seem to be able to run in parallel, as [2]Perl
#126213 points out.
James E. Keenan suggests moving forward on the patch by Tony Cook to
address [3]Perl #126084 fixing the do undef problem Ricardo Signes
raised.
Konstantin Kokin reported in [4]Perl #126224 apparent slowness in
[5]IO::Socket::INET when testing with [6]ab. Paul "LeoNerd" Evans
suggested it might have to do with DNS queries (which Konstantin
rejected)
and ventured that [7]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 [8]Perl #126229, explaining that [9]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 [10]Perl #126239, addressing [11]File::Glob's confusing
documentation regarding the GLOB_NOCHECK option.
Bulk88 provided a patch in [12]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 [13]Perl #126244 to remove
B::Section, as
Todd describes:
This package is a vestigial reminant of [14]B::C's removal [...]
Regex bugs
Victor Adam is continuing his quest for finding weird Regexp bugs and
raised [15]Perl #126222, finding a problem with:
print /(?(?!)(?{print "Yes"})|(?{print "No"}))/
This was fixed by Yves Orton just a few days later in
[16]6625d92602279361acd0c6185b78c6d201fd81e0.
Victor also raised [17]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 [18]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
[19]Perl #126257, reduced to:
0/x$0my@m:d
and [20]Perl #126258, derived from:
grep$0,0}
and [21]Perl #126260, caused by:
/0\G|0+|/>>s>>\x{100}>>s>>>g/0
and [22]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 [23]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 defines in perl.h
Karl Williamson also raised [24]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 [25]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 to PL_warnhook without
updating $SIG{__WARN__}, and buggy XS modules could do the same.
Max suggests picking up [26]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 [27]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
[28]Moose or [29]Dancer (or [30]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 [31]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 [32]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 [33]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 [34]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 [35]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.
References
1. https://metacpan.org/pod/Storable
2. https://rt.perl.org/Ticket/Display.html?id=126213
3. https://rt.perl.org/Ticket/Display.html?id=126084
4. https://rt.perl.org/Ticket/Display.html?id=126224
5. https://metacpan.org/pod/IO::Socket::INET
6. https://httpd.apache.org/docs/2.2/programs/ab.html
7. https://metacpan.org/pod/IO::Socket::IP
8. https://rt.perl.org/Ticket/Display.html?id=126229
9. https://metacpan.org/pod/POSIX
10. https://rt.perl.org/Ticket/Display.html?id=126239
11. https://metacpan.org/pod/File::Glob
12. https://rt.perl.org/Ticket/Display.html?id=126242
13. https://rt.perl.org/Ticket/Display.html?id=126244
14. https://metacpan.org/pod/B::C
15. https://rt.perl.org/Ticket/Display.html?id=126222
16.
http://perl5.git.perl.org/perl.git/commitdiff/6625d92602279361acd0c6185b78c6d201fd81e0
17. https://rt.perl.org/Ticket/Display.html?id=126253
18. https://rt.perl.org/Ticket/Display.html?id=126181
19. https://rt.perl.org/Ticket/Display.html?id=126257
20. https://rt.perl.org/Ticket/Display.html?id=126258
21. https://rt.perl.org/Ticket/Display.html?id=126260
22. https://rt.perl.org/Ticket/Display.html?id=126261
23. file:///dev/...
24. http://nntp.perl.org/group/perl.perl5.porters/231533
25. https://rt.perl.org/Ticket/Display.html?id=125439
26. https://metacpan.org/pod/Coro
27. http://perl5.git.perl.org/perl.git/commitdiff/3b90fd9
28. https://metacpan.org/pod/Moose
29. https://metacpan.org/pod/Dancer/
30. https://metacpan.org/pod/Dancer2
31. https://rt.perl.org/Ticket/Display.html?id=126057
32.
http://perl5.git.perl.org/perl.git/commitdiff/5a4fed095144d9c2f728401b3a0938f80aca4bcc
33. http://nntp.perl.org/group/perl.perl5.porters/231501
34. https://rt.perl.org/Ticket/Display.html?id=125937
35.
http://perl5.git.perl.org/perl.git/commitdiff/2119163cf9aaa352780f851b9f0b14473ec55a41