In association with heise online

15 May 2011, 12:09

Perl 5.14 released

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

As promised, the 'Perl porters' have now released this year's stable version of the Perl programming language. Version 5.14 brings together more new features than were collected during the development and since the release of Perl 5.12 in April 2010. There are few major extensions like those found in Perl 5.10; instead Perl 5.14 consists of many minor modifications to resolve practical problems, enhancements to make behaviour more consistent, and small-scale changes with an eye on Perl 6.

Improvements in Perl 5.14 include full Unicode support, improved IPv6 support, easier CPAN client configuration, a new non-destructive substitution option, flags to switch regular expressions between ASCII and Unicode, a new package declaration syntax and optimisations to use less memory and CPU than previous releases.

As has been standard since Perl 5.10, functions which break compatibility can be enabled one at a time or all at once using the use feature ':5.14'; statement. Only the most important 145 of the many bugs which have been fixed are listed. In rare cases, the interpreter can be around 100 times faster when concatenating strings under Windows. The Class::ISA, Pod::Plainer and Switch modules have all been removed from the core.

The most far reaching changes in this release concern Unicode and documentation. With the historical exception of \N{BELL} (please use \N{U+1F514}), Perl now understands Unicode 6.0 in its entirety, and wherever possible no longer resorts to its own character table. use feature 'unicode_strings'; forces strings to be interpreted as Unicode for all operations, thereby resolving the bulk of outstanding problems. New control characters and modifications to regular expressions should make using Unicode easier.

A notable feature is the /r modifier, which allows transliterations (tr///) and substitutions to not change the input and instead deliver the changed string as a result; this combined with map, can also be used on lists.

    @newstring = map { s/ae/ä/gr } @oldstring;

use re '/r'; would cause all regular expressions within the current lexical scope to run in this mode. Further prettification of common code is provided by Perl's built-in list and hashes functions such as keys and push, which now automatically dereference references, thereby avoiding unseemly expressions such as %{$hoh->{Albums}{Rap}}.

Large parts of the documentation have been revised, anachronisms ironed out and the style updated. The developers have also revised the internal (XS) API, so that they have and added new methods and deprecated some other methods. These new methods include ones for introspection and to make it easier to load external multi-threading applications.

Perl 5.16, due in April 2012, will incorporate further work on making the language Unicode-clean. That work is proposed to take place during this year's Google Summer of Code. Another change under discussion for Perl 5.16 is the possible incorporation of the moose object system.

(Herbert Breunung / crve)

Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit