Ricardo is pushing for smart match changes.

A long time ago, Ricardo suggested big changes to smart matching. I added my thoughts on how that does not benefit Perl. Now he's pushing for those changes again.

This sort of change should be important to all Perl users. We already have two versions of smart match out there so you have to be careful with your Perl versions. This would add a third. I don't think these changes are in the interests of most users, and unless ordinary users pay attention, they'll get whatever p5p decides to give them.

Jesse Vincent proposed moving all smart match changes out to pragmas so you could know which one you would get. He also suggested that new features come in as pragmas before they make it into core.

Lausanne seminar update

Last week I foreshadowed that we would be offering a free evening seminar when I'm in Lausanne next month.

The arrangements for that talk are now finalized. My thanks to GULL for providing the venue, and especially to my good friend Frédéric Schütz for arranging everything.

You can get the full details of the event in the official announcement, but briefly:

What: "Taming Perl Regexes"
Where: Beausobre, Morges
When: Monday, September 24, 19:30.

It should be a fun talk, and (for a change) a very practical and useful one!
I hope to see you there.

Damian

Tech Tip: How to Package and Maintain CPAN Distributions in Mageia

Mageia Linux is an RPM-based Linux distribution, whose repositories contain over 3,000 CPAN packages, and part of the reason why it has so many is because Jerome Quelin and the other maintainers have worked on tools to facilitate creating Mageia packages for CPAN distributions and maintaining them.

However, I was a little confused about using magpie, so I'd like to share my findings here:

  1. In order to import, upload and submit a new CPAN package into Mageia, along with all of its dependencies, one should not use magpie, but rather cpan2pkg. Its use is very simple: make rpm and urpmi sudoable, and type cpan2pkg Package::Name from the command-line inside an X terminal. This will start a Tk window where one can monitor the progress of preparing new RPM packages and it has an entry box to create more packages (which saves time on re-initialising CPAN.pm or CPANPLUS.pm).

  2. In order to upgrade a package, one can type eval $( magpie co -s perl-[PACKAGE_NAME] ) and then magpie update. magpie requires minicpan to be installed and updated.

  3. In order to install packages, one can do sudo urpmi 'perl(Package::Name)'. My Module-Format module facilitates the translation from other notations for writing modules:

    up()
    {
        sudo urpmi --auto $(perlmf as_rpm_colon "$@")
    }
    

Finding Perl material online

So you need Perl information and the perldoc does not have what you need. First stop the search engine. You type in the keywords and start exploring. One thing I kept noticing with different searches were the results returned that were just the POD online. I decided I was tired of looking at it so I created a Google Custom search that filters out the sites I kept seeing that provided no value.

cpansearch.perl.org
perldoc.perl.org
cpan.org
metacpan.org
ebay.com
amazon.com

The last two kept returning information on Perl books for certain searches when it shouldn't have. Give the custom search a shot and see if it can make your searches noise free too.

Use exceptions instead of calling croak()

This little bit of test code was causing me a lot of grief:

You see the regex for qr/Table.1111111111.doesn't exist/? Due to a slight rewording in the error message, that test kept failing. However, it was failing in a way that the following test used to keep failing. As it turns out, I had fixed a bug these tests were designed to catch but it looked at first like I hadn't fixed the bug. Because of the changed error message (and me misreading the test number), I spent a lot of time trying to track down a bug that did not exist.

If I had been throwing proper exceptions, my tests would be trying to validate the class of the exception, rather than the text of the exception. I could have changed my error messages at will without worrying about breaking my tests. Yet another reason why you usually want exceptions instead of calling die or croak.

utf8::all and autodie now coexist peacefully

autodie version 2.12 works with use open now.

Recently I was reading a program that was using utf8::all and I decided to take another look at the module. The last time I tried it out was version 0.003 from 2011 and it basically did the following:

use utf8;
use open ( :std :encoding(UTF-8) );
use charnames ( :full :short );

@ARGV = map { decode_utf8($_, 1) } @ARGV;

Now autodie did not play nice with use open so that was a blocker for using utf8::all in apps. With the latest version I get use warnings qw( FATAL utf8 ). Looking at the updated POD I see that autodie 2.12 now works correctly with use open. YAY! I have applications using autodie with boilerplate utf8 support and now it is shorter. From this

use utf8;
use 5.014;
use warnings;
use warnings  qw(FATAL utf8);
use charnames qw(:full :short);
use autodie qw(:all);

#plus other stuff in the program

to this

use 5.014;
use warnings;
use autodie qw(:all);
use utf8::all;

Job postings on blogs.perl.org

The question of what standing job postings have on blogs.perl.org has come up a few times over the lifetime of the site. We discussed it informally among the team, but in the interest of clarity for everyone, we wanted to set something down in writing. These are our rules of thumb:

  • In general, we welcome job postings put up by developers or other technical members of the team being recruited for. If you want to put up a job posting on this site, chances are high that you are in this group by default. Particularly if you have a say in the hiring process for the job, please feel entirely free to post.

  • If however you are a HR person or recruiter, may we suggest jobs.perl.org as an appropriate venue to you?

We do not have hard and fast rules for cases that fall outside these clear buckets. Use your judgement; above all, don’t be annoying.

If you really feel unsure about whether your job posting is OK, feel free to get in touch with us directly via email to contact@blogs.perl.org. (Please do not use the comments on this post for this purpose. Among other reasons, you may go unnoticed.)

Getting to the Venue

image032[1].jpg

Our intrepid mapper and OpenStreetMap contributor Wieland has created a photo walk from the Airport to the venue. It also works as a guide if you arrive by train at the main train station ("Hauptbahnhof").

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.