Strawberry Perl 5.24.1.1 + 5.22.3.1 released

Strawberry Perl 5.24.1.1 and 5.22.3.1 are available at http://strawberryperl.com

More details in Release Notes:
http://strawberryperl.com/release-notes/5.24.1.1-64bit.html
http://strawberryperl.com/release-notes/5.24.1.1-32bit.html
http://strawberryperl.com/release-notes/5.22.3.1-64bit.html
http://strawberryperl.com/release-notes/5.22.3.1-32bit.html

I would like to thank our sponsor Enlightened Perl Organisation for resources provided to our project.

Swapping Things

So we all know the COMPSCI 101 method of swapping two variables:
  $tmp = $x; $x = $y; $y = $tmp;
And we all know the better way of doing it:
  ($x, $y) = ($y, $x);

And yet, I found the following in PRODUCTION CODE, that a contractor was PAID ACTUAL DOLLARS TO WRITE:
  ($tmp_x, $tmp_y) = ($x, $y);
  ($x, $y) = ($tmp_y, $tmp_x);
Weird that they knew about parallel assignment but not that you could just apply it to two variables directly.

Anyhow, this wasn’t nearly as bad as the code I found in a different module (same vendor) to swap all the 1s and 0s in a string. Now this is a somewhat less trivial problem than simply swapping two variables, but
  $str =~ tr/01/10/;
does the job nicely. Alas, in the same vein as the variable-swap, the method that vendor went with was:
  $str =~ s/0/2/g;
  $str =~ s/1/3/g;
  $str =~ s/2/1/g;
  $str =~ s/3/0/g;

Good thing $str doesn’t contain any 2 s or 3 s!

Perl 5 Porters Mailing List Summary: January 16th-22nd

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

An informal comparison of sparrow and ansible eco systems

Hi!

Here is my latest post about Sparrowdo configuration management tool written in Perl6 - Sparrow plugins vs ansible modules - an attempt of informal comparison of sparrow and ansible eco systems.

Regards.

Alexey

I hope to see you at FOSDEM in Brussels

I've been rather quiet lately because between building Tau Station and working with some clients, I'm running around faster than a long-tailed cat in a room full of rocking chairs.

I'll be in Brussels for the February 4/5 2017, FOSDEM, talking about Building the Tau Station Universe in Perl. I was planning on giving a talk about testing, but I was specifically asked if I'd talk about Tau Station. While I love the project, I tried to think of a way it wouldn't sound like a 40 minute infomercial at an open source conference.

Woman relaxing in a high-tech hotel room in a space station.
Relaxing in a high-tech hotel room in a space station.

Updated SQL BNFs from Jonathan Leffler

Jonathan Leffler has sent me a very slightly updated set of SQL BNF files for SQL-92, SQL-99 and SQL-2003. I've put them on-line.

qk: Quote Membership Hash Keys

I recently ran across an article (http://neilb.org/2016/08/08/quoted-words-arrayref.html) by neilb, advocating for a qa() operator that returns an arrayref instead of a plain array:
  our $cars_ref = qa(sedan hatchback coupe);
I love this idea, and I would use it a lot.

I’d like to add onto this proposal another qw()-style operator to quote the keys of a membership hash. I suggest qk() for “quote keys.” So
  our %is_color = qk(red blue green);
is the same as
  our %is_color = map { $_ => 1 } qw(red blue green);
or
  our @colors = qw(red blue green);
  our %is_color = map { $_ => 1 } @colors;

Unlike my previous entry (symbolic “xor”), I wrote this line of code ALL THE TIME. Taking a cue from neilb, I looked on CPAN to see how often other people do this. It turns out the answer is “a really, really lot”: http://grep.cpan.me/?q=map%5Cs*%7B%5Cs*%5C%28%3F%5Cs*%5C%24_%5Cs*%3D%3E%5Cs*1%5Cs*%5C%29%3F%5Cs*%5C%7D%5Cs*qw

Sparrow plugins evolution

Hi! Sparrowdo is a modern configuration management tool written on Perl6. If you wonder how sparrowdo makes a difference you may read this article - Sparrow plugins evolution - an informal introduction to core part of sparrowdo - sparrow plugins.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.