MetaCPAN at the 2016 Perl QA Hackathon

We made some very good progress on MetaCPAN at this year's QA Hackathon in Rugby. The whole post can be found here.

My first QAH (QA Hackathon)

The QA Hackathon gathers various major contributors to the core infrastructure of the Perl language and the CPAN. People who have immense responsibility and whose contributions fuel our work and our businesses.

The QAH is a good opportunity for these contributors to discuss important topics, reach solutions or make decisions on how to move forward, and to hack on all the core infrastructure.

I was invited to this QAH hoping I will be able to contribute. While I finally got to see a lot of people I missed and had the pleasure of meeting people I've always wished, I also tried to work on several things, all described in the results page. I'd like to get into a bit of details regarding the work I did. Let's hope it was useful enough to justify my attendance.

Perl QA Hackathon - Thanks

Besides thanking the sponsors, I also want to have a dedicated entry to say a big Thank You to the organizers. Neil Bowers, JJ, and Barbie. It was an incredible experience, well organized, nice city, and especially a nice hotel which although it could not provide "the real Wall" at least tried very hard to surround me with little Perl history hints:

Thumbnail image for Nick-Clark.jpg

I'm looking forward to whatever Sawyer device they will invent after his 16th Perl release in a row. :-)

Another big Thank You to the Wendy for the support with fresh and healthy food. And also for the less healthy and chocolate stuff :-). And another big Thank You to all the other great attendees there - it is always a pleasure to spend the time with you all.

Thumbnail image for sandwich.jpg

Perl QA Hackathon report - part 3: Net::SSH::Perl v2

This year at the Perl QA Hackathon I had three topics: benchmark update Perl until 5.24, enable CPAN test reporting on L4Linux, release a Net::SSH::Perl v2 to CPAN.

Part 3 - Net::SSH::Perl

I am co-maintaining Net::SSH::Perl, though usually I just apply patches that come up on RT or github.

Some months ago Lance Kinley implemented modern ciphers like AES, more key exchange algorithms, etc. on github - however he started from a CPAN .tgz snapshot. With the help of E. Choroba I got Lance's history rebased to my repository. However, I was short on time and wanted to do release polishing during the hackathon, and so I did.

The only trouble I had was that another patch from Brad Lhotsky which I merged earlier did conflict with Lance's changes in a way that I could solve in a git way but some tests kept failing and I did not understand why.

To be sure to not screw things up I had to give up merging and only released Lance's extensions to CPAN as a new major release v2.01.

As a side effect I also uploaded another new module from Lance, Crypt::OpenBSD::Blowfish, to CPAN.

If you are a user of Net::SSH::Perl please test if it works.

Perl QA Hackathon report - part 2: CPAN testing on L4 Linux

This year at the Perl QA Hackathon I had three topics: benchmark update Perl until 5.24, enable CPAN test reporting on L4Linux, release a Net::SSH::Perl v2 to CPAN.

Part 2 - CPAN testing on L4 Linux

To extend the diversity of platforms on CPAN TESTERS, I brought a laptop with me which runs on the L4Re micro-kernel in order to set up CPAN::Reporter tools on it. The laptop runs Ubuntu 16.04 with the kernel exchanged by L4Linux v4.4.

The only hickup I had was that the information about the operating system kernel is not picked up at runtime of CPAN installation or reporting but taken from the Perl's $Config entry. Once I realized that, I recompiled the Perl, currently using 5.22.1, re-iterated the setup, and let it run during the hackathon, with just occasional reviewing to install missing external dependencies.

Thumbnail image for cpan-reporter-log2.jpg

So if you spot a kernel version looking like 4.4.0-l4-g2be3f0e like in here - that's my L4Linux CPAN test box.

use Net::SMTPS for specifying ssl version v1

I am migrating a couple of my domains from mandrill to sparkpost
Net::SMTP by default uses SSLv3 which is not allowed by many providers due to the poodle vulnerability . I had a problem with sparkpost API and had to use Net::SMTPS which is a wrapper for Net::SMTP and you can specify the SSL version.


use strict;
use warnings;
use Net::SMTPS;
use Data::Dumper;

my $USERNAME = 'SMTP_Injection';
my $PASSWORD = '';

my $smtps = Net::SMTPS->new("", Port => 587,  doSSL => 'starttls', SSL_version=>'TLSv1');

$smtps->auth ( $USERNAME, $PASSWORD ) or DIE("Could not authenticate with gmail.\n");

    my $msg =

        "Subject: Test\r\n".

        'To:'."\r\nFrom: ".''."\r\n\r\n Hello From the other side";

$smtps->datasend( $msg );

Perl QA Hackathon report - part 1: Perl::Formance

This year at the Perl QA Hackathon I had three topics: benchmark update Perl until 5.24, enable CPAN test reporting on L4Linux, release a Net::SSH::Perl v2 to CPAN.

Part 1 - Benchmark::Perl::Formance

To keep a benchmark stable but still allow further development, last year I started to create separate bundles of existing benchmarks, starting with the "PerlStone2015" suite. Once settled I would only touch it for maintenance, and for newer developments I can fork it into an independent "PerlStone2016" suite where I could adapt the timings for newer hardware, other benchmarks, or particular language features.

This hackathon I reviewed and polished it to take reasonable runtime in "normal" mode so it does not take weeks to execute and also in "fastmode" where a benchmark produces results within 1-2 seconds.

Perl 6: Comb It!

In Perl 5, I always appreciated the convenience of constructs like these two:

my @things = $text =~ /thing/g;
my %things = $text =~ /(key)...(value)/g;

You take some nice, predictable text, pop a regex next to it, and BOOM! You get a nice list of things or a pretty hash. Magical!

There are some similarities to this construct in Perl 6, but if you're a new programmer, with Perl 5 background, there might be some confusion. First, using several captures doesn't result in nice hashes right off the bat. Second, you don't get strings, you get Match objects.

While Matches are fine, let's look at a tool more suited for the job: The comb


Plain 'Ol Characters

You can use comb as a subroutine or as a method. In its basic form, comb simply breaks up strings into characters:

'foobar moobar 駱駝道bar'.comb.join('|').say;
'foobar moobar 駱駝道bar'.comb(6).join('|').say;

# f|o|o|b|a|r| |m|o|o|b|a|r| |駱|駝|道|b|a|r
# foobar| mooba|r 駱駝道b|ar

About 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.