Sunday, 31 October 2010

Glasgow Perl Mongers, a couple months on

I blogged about creating the Glasgow Perl Mongers group some time ago; I feel it's time to talk about it again :)

First things first, the fine folks handling finally redirected the domain and made things official: is now our site.
Thanks guys, we do owe you a couple beers!

We have had our first social and our first technical meeting, and we're heading into our second technical meeting, scheduled for November 11th. The aim of the group is to have recurring monthly technical meetings, possibly related to Perl.

On our first technical meetings we were joined by Aaron Crane of fame, who gave his YAPC::EU 2010 talk "Perl on speed: multicore programming for mere mortals", available at I subsequently delivered a very long talk on "Life after 5.8.8", and a lightning talk on Leguminous (Git repos).

For our next monthly meeting, things are looking great: we'll have a talk on comparing Git and darcs, by Miles Gould, a talk about "Loops without loops: Ocaml and Perl as functional languages", by Chris Yocum and probably even another one on automatically compiling statically typeable portions of Perl scripts, by Wim Vanderbauwhede.

Things are looking great! If we keep up this pace, we'll surely have a good deal of talks every month!

Thanks again to mst for having said the right words and suggesting that yes, creating a Perl Mongers group in Glasgow was well within what I could do.

All, you're more than welcome to join us on our technical meetings ;) We do have a social meeting afterwards ( at a local pub as well.

Till soon,

Thursday, 26 August 2010


During YAPC::EU mst suggested "why don't you just start"

I talked about it a bit with a friend who'll be back in the country soon enough and even today at work, and I think we may have enough people to kickstart the new Perl mongers group.

I know there are several businesses and people in the West of Scotland who either use or like Perl, so I am hoping that enough of them would like to join the group.

I've sent the request to's support to reinstate the old I will endeavour to bring the mailing list and website up as soon as possible, and will start reaching out to people who use Perl in the area. Dear lazyweb, could you help me?

In contrast with's meetings, which are mostly "social" gatherings in the pub, I would like's meetings to be a bit more on the technical side. I am hoping we will be able to secure a good venue for that (crossing fingers!), and that we'll have enough people and interest to have a bunch of talks and lightning talks at each meeting.
Depending on what the consensus is, I think we may end up having a technical meeting one month, and one social meeting the next.

Please spread the word if you think somebody in the area may be interested in coming along, and feel free to contact me both on this blog and via e-mail at mfontani at cpan dot org.

Oh, and I'd be proposing the second tuesday of the month as the meeting's day ('s is the fourth Thursday -- tomorrow). This would allow people in either city to attend either meetings.

Wish me good luck! :)

p.s. Visit for the (temporary) website.

Tuesday, 8 December 2009

Cloud laziness part 1: creating a CloudServers server instance

The following is ongoing on my private branch of the CPAN dist Net::RackSpace::CloudServers, in which I'm creating an App::Cmd interface to the module:

okram@bluedesk: (with_app_cmd)
~/GIT/Net-RackSpace-CloudServers$ perl create \
--name=mfapitest --imagename karmic --flavorname 256 --verbose
Server name: mfapitest
Image id 14362 named Ubuntu 9.10 (karmic)
Flavor id 1 named 256 server
Creating new server...
Created server ID 124999
root password: mfapitestXXXXXXX
Public IP:
Private IP:
Server status: ACTIVE progress: 100..
Server now available!

The same is indeed doable with the sample scripts/ in the dist -- and I also need to use scripts/ to destroy the test instance -- but I assume that a command-line interface may be useful in the longer term to scale up/down specific instances, create N new servers in a shared IP group, or destroy no longer needed instances.

The command was pretty painless to write, and most of it was the validate_args routine...

As usual, comments would be much appreciated!

Till soon,


Sunday, 29 November 2009

Git - inhibit commit if modules don't compile

Sometimes I forget to run Perl base tests for my modules, before committing changes. As to what happens, I end up committing something that doesn't quite compile ;)

Luckily Git has a pre-commit hook one can use to run at least the "compile" tests.

The following aborts the commit if the t/00*.t tests (usually the "do all modules compile?" tests) in the repository don't run correctly:

~$ cat .git/hooks/pre-commit
# Runs modules' "compiles" tests before committing
# Dies (halting commit) if they don't compile
print "pre-commit => testing..\n";
do {qx{
prove -Ilib t/00*.t
}} or die <<'DIEMSG';
pre-commit => ERRORS:
print "pre-commit => test OK\n";

This is an example of a 00-load.t file, that can literally be dropped-in the t/ directory:

use strict;
use warnings;
use Test::More;
use File::Find::Rule;

my @files = File::Find::Rule->name('*.pm')->in('lib');
plan tests => ~ ~ @files;

for (@files) {

eval "require $_; 1",
"loaded $_ with no problems",

File::Find::Rule is one of the golden gems found on CPAN, rclamp++!

Till soon,

Sunday, 22 November 2009

CloudServers Perl module - 0.09_10

perl -E'say join " ", reverse world, hello' # :)

I've finally found some time to play again with the Rackspace API manual, and added a couple features to the Net-RackSpace-CloudServers module I hadn't touched since moving home some months ago.

The project is semi-alive on, and the latest 0.09_10 development version should be on CPAN soon.

It's basically a one-to-one adaptation of the Rackspace API document available at

On the scripts/ directory there are some examples on how to use the module: it's possible to list all images, flavors, and servers you own, as well as delete servers by ID or create new servers in what I think is quite a simple syntax.

As an example, let's delete that pesky server whose ID's 666:

use strict; use warnings; use Net::RackSpace::CloudServers;
my $cs = Net::RackSpace::CloudServers->new(
my @servers = $CS->get_server_detail;
my $srv_666 = ( grep { $_->id == 666 } @servers )[0];
die "No such server id 666\n" if ( !defined $srv_666 );
$srv_666->delete_server(); # dies in case of error
print "Server #666 deleted\n";

On a branch not on Github yet, I'm working on an App::Cmd interface to it, as well.

Any comments at all would be truly appreciated, as this is my first module I'm trying to get on CPAN ;)

Till soon,