Perl 5 Porters Weekly: November 19-November 25, 2012
Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list. Sorry I didn't publish a summary last week. Although there was list traffic I didn't find any messages I wanted to summarize.
This week's topics include:
- perl 5.17.6 is now available!
- On deprecating unescaped literal left brace
- Parrot 4.10.0 released
- Perl in Git on Windows?
- Move tests not using t/test.pl into a separate directory
- Hash randomisation breaks CPAN
perl 5.17.6 is now available!
Ricardo Signes announced that perl-5.17.6 is now available on a CPAN mirror near you.
Read perldelta and see what's new
On deprecating unescaped literal left brace
Karl Williamson summarized a discussion from P5P several months ago about literal left braces (i.e., "{") in regex. He writes:
The motivation for doing the deprecation is to eventually forbid an
unescaped literal left brace, and the motivation for doing that is
really threefold:
a) It is too easy to make a typo in a quantifier, and have it silently
be turned into a literal. An example is the programmer thinking that /x
allows spaces in the quantifier, like "/foo{1, 3}/x". This matches the
characters literally. There are similar examples, like forgetting the
closing brace.
b) We are prevented from extending the quantifier syntax to, say, allow
such a space under /x, or to accept "foo{,7}", which now also silently
matches literally.
c) The left brace (or curly bracket) is the obvious candidate to use to
extend the language in various ways. For example, in Unicode there
several different types of word boundaries that could reasonably be
desired. Perl only knows about its traditional one. It would be nice
to be able to specify a different one, like "\b{g}"
The reason there is a problem with blead, is if the delimiters of the
pattern are braces, the lexer/tokenizer strips off any backslash that
the programmer added before handing it to the regex parser, so it is
futile for the programmer to add a backslash. There is no work-around,
except to not use braces as the delimiters. Braces are used very
commonly as delimiters.
[...]
That presents a way out of the dilemma. We revert the patch that
instituted the current warning. Then we deprecate adding extraneous
backslashes, so that "m{^a\{1,2\}$}" would generate a warning. In 5.22,
we would change the lexer/tokenizer to not strip off the preceding
backslashes of paired regex delimiters, and reinstitute the warning
about unescaped left braces. We announced in 5.16's perldelta that
unescaped left braces would change behavior in 5.20. We should update
that announcement in the deltas for 5.18 through 5.22 that the release
for this change is 5.24.
Yves Orton and Ricardo Signes seem to think this is a good change.
Parrot 4.10.0 "Red-eared Parakeet" Released
Reini Urban announced that Parrot 4.10.0 has been released.
Perl in Git on Windows?
Leon Timmermans responded to a post on blogs.perl.org about the bundled perl in the "Git on Windows" installation bundle. Apparently it's a rather old version of Perl (5.8.8). Leon thought it would be nice if the Perl core could support msys out of the box and asked if anyone was interested in porting the build patches into this decade.
Move tests not using t/test.pl into a separate directory
James Keenan describes an unfortunately common scenario when someone refactors a bit of testing code in perl's core, and is subsequently told after submitting the patch that it's an invalid change for some reason.
His proposal is to document and sort the test code in core so that a contributor can understand what testing requirements and assumptions may be used to refactor it in the future.
He wants to:
* Create a new subdirectory called t\/opbasic.
* Move any t/op/*.t files which do not already use t/test.pl into
t/opbasic -- i.e., assume that any t/op/t file which already uses
t/test.pl does so properly.
* Adjust 'perlhack' and other documentation as needed.
* Study those files which we have moved to t/opbasic to see whether they
are, in fact, eligible to use t/test.pl. If so, move them back to t/op
and convert them.
And as a corollary, encourage new contributors to add descriptions to
the files under t/op, as we did in St Louis this past weekend.
Hash randomisation breaks CPAN
Father Chrysostomos posted a list of CPAN modules which break due to hash order assumptions which became truly random recently in blead.
The modules are:
- Aspect 1.03
- Autocache 0.004
- CatalystX-Controller-Sugar 0.0901
- Class-AutoClass 1.54
- Convert-yEnc 1.04
- cPanel-PublicAPI 1.002
- Crypt-OpenPGP 1.06
- DateTime-Format-Flexible 0.23
- FormValidator-LazyWay 0.19
- Google-AJAX-Library 0.022
- Hash-AutoHash-Args 1.15
- libwww-perl 6.04
- MooseX-Getopt 0.47
- Params-Validate-Checks 0.01
- Socialtext-Resting 0.38
- Term-GentooFunctions 1.3605
- Test-Inline 2.212
- Tie-Hash-Indexed 0.05
- WebService-Simple 0.18
- XML-TinyXML 0.30
(And there are more discovered too. See the full RT ticket for all of them)
Nicholas Clark writes:
This seems an excellent task that *anyone on this list* could help chip away
at, given that likely all it needs is a knowledge of perl.
So, volunteers welcome.
1) Pick a module from the list
2) figure out the fix
3) send a patch to that module's bugtracker
4) feel good