Perl 5.20 And Mojolicious 5.0 Released
Written by Alex Armstrong   
Tuesday, 03 June 2014

New versions of Perl and of Mojolicious, one of its real-time web application frameworks have been released within a couple of days of one another.

 

In his announcement of Perl 5.20, Ricardo Signes points out that it:

represents approximately 12 months of development since Perl 5.18.0 and contains approximately 470,000 lines of changes across 2,900 files from 124 authors

all of whom are credited. 

Perl 5.20 has a  new slice syntax whereby %hash{...} and %array[...] syntax returns a list of key/value (or index/value) pairs. It introduces two experimental features which have been welcomed enthusiastically by Dave Farrell on Perl Tricks:

Subroutine signatures

This is the big one. It's hard to understate how great this is. No more ugly assignment code - with 5.20 you can write:

perl520ss

 

Postfix dereferencing

The next cool new feature is postfix dereferencing. Hard to describe but easy to show:

perl520pfderef

 

Farell also reports:

Perl 5.20 compiles on Android! The current documentation is online, and will be accessible via "perldoc android" once you've installed 5.20.

Perl News also lists the following enhancements: 

  • Unicode 6.3 now supported
  • New \p{Unicode} regular expression pattern property
  • More consistent prototype parsing
  • More locale initialization fallback options
  • rand now uses a consistent random number generator
  • subs now take a prototype attribute
  • use locale now works on UTF-8 locales
  • use locale now compiles on systems without locale ability
  • -DL runtime option now added for tracing locale setting
  • -F now implies -a and -a implies -n
  • $a and $b warnings exemption
  • Better 64-bit support

 

There is also a new release of a Perl app framework. Mojolicious is real-time web application framework, written in Perl by Sebastian Riedel, based on his previous experience developing Catalyst. It is described as having: 

"Out-of-the-box support for RESTful routes, plugins, commands Perl-ish templatessession management, form validation, testing framework, static file server and full Unicode support."

 mojo

 

In a recent interview, Catalyst's co-maintainer Matt S. Trout said of Mojolicious that it
"has a very well-documented staged back compatible breakage policy which they stick to religiously, and a “move fast and break stuff” style application development",

In his blog post about the new Mojolicious 5.0 release Sebastian Riedel includes the following in his list of the highlights:

  • New exception and not_found pages:

mojonotfound

  • Extensible form validation with CRSF (cross-site request forgery) protection
  • Template variants - to make your application look good on different devices use the variant stash value to choose between different variants of your templates.
  • New Mojo::DOM with support for many different node types and new ways to manipulate HTML
  • A new way to do zero downtime restarts and high performance web servers using the SO_REUSEPORT socket option
  • A new way to reuse non-blocking code
  •  A new spin-off project Minion - a Mango job queue

perlsq

Banner


Ruby On Rails Adds Kamal And Thruster Support
17/12/2024

Ruby on Rails 8 has been released. The new version comes preconfigured with Kamal 2 for application deployment, a new proxy called Thruster, and a trio of SQLite database-backed adapters named Solid C [ ... ]



A Tee Is Not Just For Xmas - Top Tees
20/12/2024

Programmer gifts - easy idea, difficult implementation.  Here's our pick of tee-shirts for giving, buying or just wearing at any time of the year.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 03 June 2014 )