OpenBSD Journal

Perl Updated to 5.20.1

Contributed by tbert on from the perl-jam dept.

Andrew Fresh (afresh1@) has updated Perl in base to 5.20.1:
CVSROOT:	/cvs
Module name:	src
Changes by:	afresh1@cvs.openbsd.org	2014/11/17 13:53:21

Log message:
    Import perl-5.20.1

Additionally, he wrote in to give us a quick intro to what he thinks are some of the more interesting changes to be found:

More helpful descriptions of the changes are here, and a summary of some of the bits can be found here

Lots of performance enhancements, updated core modules, and documentation improvements.

They also pulled in some of our local patches which means we differ less from upstream now.

Some of the changes since perl 5.18 stand out:

  • Experimental Subroutine signatures (which are awesome!)
  • subs now take a prototype attribute
  • More consistent prototype parsing
  • rand now uses a consistent random number generator

This is a FreeBSD derived drand48 pseudorandom, not sure I'm 100% liking it, and probably want to upstream the ability to use our system pseudorandom stuff, but for now, it's pseuodorandom; if you want actual random, there are modules that can do that.

We do patch it to seed with arc4random by default, although I need to push that upstream.

Which is so nice! `my %slice = %hash{qw( key1 key2 key3 )};`, very much looking forward to using it!

This is the one I think is the best new feature, tho it is experimental.

  • Unicode 6.3 now supported
  • New \p{Unicode} regular expression pattern property
  • use locale now works on UTF-8 locales
  • use locale now compiles on systems without locale ability
  • More locale initialization fallback options

Lots of test failures I had to ignore on OpenBSD, so I'm not actually sure what benefit we get without better support for unicode and locales in the base system, but glad they care. I do wish someone would fix stuff to let me display emoji in uxterm :-)

While there is a rumor, possibly started by netcraft, that perl is dying, this is definitely not the case, although perl programmers are often busy getting stuff done and not doing advocacy. For those who have not used perl in a while, or have only seen perl that was written just to get the job done, there are now many conventions for writing Modern Perl now that lead to readable, maintainable, code while still allowing for the expressivity and power that perl allows.

(Comments are closed)


Comments
  1. By mirabilos (94.198.62.204) on

    You can’t have Emoji in uxterm because it uses BDF/PCF fonts, which have the limitation that the lowest and highest glyph in the font cannot be more than 2¹⁶ apart. Since you typically want U+0020 (space), you can’t go much farther than U+FFFD (I think U-0001001E would work. But the emoji are much farther in the SMP.)

    That being said, xterm is still the only terminal emulator capable of displaying all the Unicode things I do ;-) even if only in the BMP. And fixed-misc is the nicest font with lots of glyphs.

    Comments
    1. By Rusty (65.203.141.66) on

      > You can’t have Emoji in uxterm because it uses BDF/PCF fonts, which have the limitation that the lowest and highest glyph in the font cannot be more than 2¹⁶ apart. Since you typically want U+0020 (space), you can’t go much farther than U+FFFD (I think U-0001001E would work. But the emoji are much farther in the SMP.)
      >
      > That being said, xterm is still the only terminal emulator capable of displaying all the Unicode things I do ;-) even if only in the BMP. And fixed-misc is the nicest font with lots of glyphs.

      I have no idea if xterm can internally handle items over 2^16, and the complexity of unicode worries me. However xterm does quite nice with freetype fonts, if that helps them that want to deal with unicode 🐮💩

      I do find it odd that undeadly let your superscript 1 through but it ate your superscript 6

  2. By Tim Howe (66.39.160.90) on

    I really appreciate the work that goes into keeping OpenBSD so up-to-date with Perl. It makes my life that much easier that I can use the latest features with confidence on my servers.

    Thanks!

  3. By brynet (Brynet) on http://brynet.biz.tm/

    Out with the old perl, in with afresh1. :-)

  4. By Ralph Siegler (ralphsiegler) admail@rsiegler.org on http://www.rsiegler.org

    No one is claiming Perl 5.x is dying yet. It's just the future of the language, version 6 and beyond, that Larry has utterly destroyed with his screwing around for 14 years

    If Perl 6 were a socket set undergoing R&D, it would have egg beater, pencil, shoe horn and octopus attachments.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]