Perl 5.26.0 is now available!
I am delighted and proud to announce the release of Perl 5.26.0! You can read the release announcement.
It has been the first release done under my fidgety guidance. I want to take this opportunity to share my thoughts on this release and the process we had producing it.
The release
In short: We've added a few things, sped up quite a bit, and fixed a wide array of issues. Here are some of the highlights:
We removed the current directory from @INC
We consider this a security change, and although it might cause discomfort to some users, we had to do it. Both Perl 5 Porters and the Toolchain Gang put effort into easing the transition to a dot-less @INC
.
If you want to load a module from the current directory, you can still do this in one the following ways:
# load . using lib.pm
use lib '.'
# Add . to @INC manually
BEGIN { push @INC, '.'; }
# Use the environment variable
PERL_USE_UNSAFE_INC=1
The environment variable is mostly useful for testing and debugging. The toolchain uses it currently to smooth over testing and installation, but we do not recommend you use it to avoid fixing any requirements on the current directory. In the future, you will have to compile this variable in, so you might as well fix any problems you see now.
Various people were involved, but a big thank you goes to John Lightsey, Todd Rinaldo, Tony Cook, Leon Timmermans, Karen Etheridge, Kent Fredric, Graham Knop, and Aristotle Pagaltzis.
We added indented HEREDOCs
Matthew Horsfall (alh) implemented indented HEREDOCs. It might seem like a small feature, but it's the kind of change that improves your experience as a developer.
if (1) {
print <<~'EOF';
Hello there
EOF
}
We support Unicode 9.0.
Karl Williamson (khw), amongst his many sins, added support for Unicode 9.0.
With Unicode 9.0 you can offer someone an \N{AVOCADO}
and if they refuse, \N{FACE PALM}
in despair. Of course, it isn't just additional Emojis with Unicode 9.0. More languages are included: Osage (Native American), Nepal Bhasa (a language of Nepal), Fulani (as well as other African languages), the Bravanese dialect of Swahili (used in Somalia), and more.
Read more about Unicode 9.0.
New variables for captured information
Capturing variables ($1
, $2
, $3
, $4
, %+
, %-
) are all fun at first until the fun stops. Thanks to Yves Orton (demerphq), we now have additional variables to use when reaching for captured information:
You can use @{^CAPTURE}
to access captured variables.
You can use %{^CAPTURE}
to access named captures, similar to %+
(or %LAST_PAREN_MATCH
if you use English.pm).
You can use %{^CAPTURE_ALL}
to access the named capture groups in the last successful match in the currently active dynamic scope, similar to $-
. If you don't know what this is, you can read more about it in perlvar.
Expanding character classes
If you use /xx
, you can now also expand character classes in regular expressions.
Imagine the following:
qr/ These \s characters: \s [d-eg-i3-7] /x
That's nice. But you know what's nicer?
qr/ These \s characters: \s [ d-e g-i 3-7 ] /xx
Or even this option:
qr/ [ ! @ " # $ % ^ & * ( ) = ? < > ' ] /xx
Much better!
Script Extensions
Regular Expressions now use the Script Extensions property by default. This makes script recognition more accurate. Another gift from Karl.
Various performance improvements
We improved performance considerably. It is especially visible in Subroutine Signatures, which are now comparable in performance to traditional signature-less code. Thank you for this and many other optimizations, Dave Mitchell.
64-bit builds now use a new hashing function. It provides a significant improvement in performance for very long keys. Thank you, Yves Orton.
The perldelta document covers the whole of these changes and makes for an interesting, albeit long, read.
Countless people spent precious hours improving and fixing Perl, and their efforts are greatly appreciated. Their names appear in full in the release notes, but I've also added them to the end of this blog post.
The process
Looking back at this past year, working on this version, I can sum it up best as "This year has been a long year."
The work on @INC
was exhausting. Much of it related to 5.24 maintenance releases, rather than 5.26. We released two additional development versions (5.25.11 and 5.25.12) due to it.
Todd Rinaldo and I organized a core hackathon. It was invigorating, and we intend to hold more of them in the future. You can read our report.
I've learned a few key lessons:
- Sleepless nights will be more frequent in my future than I thought.
- People get very emotional. Many of these people are those who argue they are not emotional.
- I get emotional too.
- It's worth it.
- Perl is a community effort: The CPAN as well as the language. Working together is how we accomplish wonderful things, and it's how we will continue to do so.
Thank you
Thank you to everyone involved with this release: Aaron Crane, Abigail, Ævar Arnfjörð Bjarmason, Alex Vandiver, Andreas König, Andreas Voegele, Andrew Fresh, Andy Lester, Aristotle Pagaltzis, Chad Granum, Chase Whitener, Chris 'BinGOs' Williams, Chris Lamb, Christian Hansen, Christian Millour, Colin Newell, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins, Daniel Dragan, Dave Cross, Dave Rolsky, David Golden, David H. Gutteridge, David Mitchell, Dominic Hargreaves, Doug Bell, E. Choroba, Ed Avis, Father Chrysostomos, François Perrad, Hauke D, H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E Keenan, James Raspass, Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, J. Nick Koston, John Lightsey, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Maxwell Carey, Misty De Meo, Neil Bowers, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Paul Marquess, Peter Avalos, Petr Písař, Pino Toscano, Rafael Garcia-Suarez, Reini Urban, Renee Baecker, Ricardo Signes, Richard Levitte, Rick Delaney, Salvador Fandiño, Samuel Thibault, Sawyer X, Sébastien Aperghis-Tramoni, Sergey Aleynikov, Shlomi Fish, Smylers, Stefan Seifert, Steffen Müller, Stevan Little, Steve Hay, Steven Humphrey, Sullivan Beck, Theo Buehler, Thomas Sibley, Todd Rinaldo, Tomasz Konojacki, Tony Cook, Unicode Consortium, Yaroslav Kuzmin, Yves Orton, Zefram.
Leave a comment