A big week in Oslo

Next week I will be returning once again to beautiful Oslo, for a visit brim-full of all things Perlish.

For a start, I'm running two public classes on Wednesday March 4 and Thursday March 5,
in conjunction with Oslo.pm and Redpill Linpro.

On Wednesday, I'll be teaching the follow-up to my Perl Best Practices class (which we ran in Oslo several years ago). In this new course, Perl Even-Better Practices, I'm revisiting the guidelines that I first devised nearly ten years ago now, updating my advice and suggestions to reflect the huge number of changes both in Perl itself, and in the CPAN ecosystem, during the intervening decade. I'll be demonstrating and explaining 50 new guidelines, designed to make your Perl code even cleaner, safer, and faster.

Public Voting through Twitter

Last week, we organized a charity party. It was more like a contest, or a show, in which 10 teams participated. Each team was supposed to perform a show on their choice: dance, music, or even a play. We also had a judge of 5 people to grade performances. These people were not the only ones to decide who wins the night, though. There was going to be a public voting, that anyone can participate.

So I wrote a Perl script for the party. We picked an event keyword starting with a # character, and listened Twitter for tweets including that word. Then, we had different keywords for each team. Anyone who wanted to cast their vote would just tweet with event keyword + team keyword, and that would be it.


Image: People asking their followers to vote for their teams

Dancer2 0.159000 waiting for you on CPAN!

Hi everyone,

It's been a little while since we had a release. We took longer this time because this release provides a few major improvements we wanted to mature.

With 13 contributors and 23 tickets closed, I'd like to present Dancer2 0.159000.

Strawberry Perl 5.20.2.1 released

Strawberry Perl 5.20.2.1 is available at http://strawberryperl.com

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

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

On OP_SIGNATURE

Since it is not possible to write p5p criticism to the mailing list, I'll have to do it in my blog. @p5p: think over your guidelines. I don't believe that stuff like that needs to be blogged.

DaveM now introduced a new OP_SIGNATURE which assigns run-time args according to the compiled signature.

It basically speeds up these compiled checks

    sub f ($a, $b = 0, $c = "foo") {};

=>

    sub f {
        die sprintf("Too many arguments for subroutine at %s line %d.\n", (caller)[1, 2]) unless @_ <= 3;
        die sprintf("Too few arguments for subroutine at %s line %d.\n", (caller)[1, 2]) unless @_ >= 1;
        my $a = $_[0];
        my $b = @_ >= 2 ? $_[1] : 0;
        my $c = @_ >= 3 ? $_[2] : 'foo';
        ();
    }

into one OP, which does the same, similar to the new MULTIDEREF. Moving op chains into C. DaveM is now the goto guy for the big DWIM ops, compressing previous op chains into a single one.

New Perl Module: AWS::SNS::Verify

I’m pleased to announce the release of AWS::SNS::Verify. If you’re using Amazon Simple Notification Service then you need a way to verify the authenticity of messages coming from SNS. This module handles that easily for you.

[From my blog.]

Building a Thin Controller

I haven't updated about Veure in a while and though this post isn't really about Veure, per se, I'll use some code from it to illustrate a "thin controller."

There's a lot of confusion about the thin controller/fat model advice which gets passed around. In fact, I've seen some developers get upset about the idea, claiming that it's the model which should be as thin as possible. I'll explain what's really going on and give some real-world examples, using code from Veure.

Avoid a Common Software Bug By Using Perl 6

Back in 2001 I was working for a company who had a client who was in a serious bind: the maker of their point of sale (POS) system suddenly jacked up the license fee to the point where our client would go out of business. They needed a new POS in 21 days.

We grabbed an open source POS system and identified all of the features it was missing that our client would need. Then it was 21 days of overtime and no days off. Back in the days of use.perl.org, I blogged about this hell almost every day. It was also, interestingly, the first project I wrote software tests for. The other main dev on the project was teaching me how Perl's testing tools worked and as the days went on, I found myself incredibly proud of seeing all of those tests pass and catching bugs I would not have otherwise caught.

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.