In: Events
13 Mar 2013This is one of those blogposts, that should have been written on the plane home or on the hotel during the conference, but with too much going on and a load of work upon returning to work, it got delayed. This is an all too common pattern for me.
Anyway to get on subject, I have just attended my first German Perl Workshop ever. I decided to go when I saw it was in Berlin. Berlin is fairly close to Copenhagen and I am very in love with Berlin, so I did not want to miss an opportunity to visit Berlin.
The German Perl Workshop is the longest running of the many Perl workshops around. We got inspired by the German Perl Workshop when we started the Nordic Perl Workshop. The German Perl Workshop runs as a single track of presentations, with each day ending in lightning talks and social events.
Before the workshop kicked off there was a pre-event meeting, which was great close to both the play where I stayed and the venue. The venue was great, it was sort of, if not a hacker space named Betahaus.

View towards the Berlin TV tower from Betahaus.
Most of the talks were in german, but I understand german much better than I speak it. I was dead tired after the first day though and I did not get all the jokes. Some of the talks were hard to follow, but that were due to their topics rather than language barrier and they would have been just as hard to follow even in english or danish. Other talks were on topics I had heard before and I am sorry to say, but those talks was the same old song, so the language was not important when attempting to get the message through.
Some of the talks at the German Perl Workshop was on the topic of the Perl community, marketing etc. We have had this discussion over and over and I will not go into detail on the topic here and I will not let this post be on the topic.
I will briefly touch on some of the talks, from which I jotted some notes down. I normally do a more elaborate blogging following-up on events such as conferences and workshops, but I decided to boil the 3-day German Perl Workshop down to a single post, simply to get something posted, instead of ending in a dead by draft status.
Ulrich Habel (RHAEN) gave a talk entitled “Dependencies and Deployments”. Here he mentioned puppet-perlbrew (available on Github). It’s a perlbrew integration with Puppet. We are evaluating Puppet where I work and among other operating systems it support the ones we use. Perlbrew is magnificent and I am reconsidering using it in production. I have on a previous occasion recommended not to do so, but the more I use it and the more I get to know it, I am getting more keen on the idea.
Ulrich also gave a talk on Carton. A presentation was made to the Copenhagen Perl Mongers on Carton recently at a meeting where I was not able to attend, but I feel like I am missing out on something and Carton sounds like it is worth checking out.
Steffen Ullrich gave a talk on Net::IMP and network traffic inspection and manipulation. Not exactly my key interest area, but it was quite impressive especially in regard to how easy it was to hook in the network flow with a proxy and manipulate data. I swiftly got the idea of writing a filer to clean PDF documents of meta-data. So if somebody has the time and just need an assignment/challenge to get something done using Net::IMP, please feel free to tell me if you get such a filter implemented.
Max Maischein (CORION) did a presentation on two-factor authentication with Google Authenticator. This topic is of professional interest to me, most of my notes was work related so I will just mention the following distributions, which look like very interesting or promising:
- Auth::GoogleAuthenticator
- Authen::OATH
- Imager::QRCode
Max gave a very good live demo, which actually worked and his presentation on the topic was very good, understandable and covering.
Thomas Klausner (DOMM) presented his App::TimeTracker in a talk on Metaprogramming and Method Modifiers. App::TimeTracker is available on Github and a nice website with a video demo is available. Time registration is a very personal thing, but the tools was quite handy and App::TimeTracker might be the tool you need.
Thomas also gave a talk on ZeroMQ and AnyEvent. He mentioned: ZMQ::LibZMQ3, which is a very low-lever c-like library, but it is still recommended if you want to do advanced stuff with queues even though a more high-level approach is available using Daisuke Maki’s ZMQx::Class (I might have this wrong in my notes, but I have been unable to locate this module, suggestions most welcome). ZeroMQ has a very nice guide if you (like me) want to get started with message queuing.
I gave, what will be my last presentation on Stackato for now. It was the largest audience I have spoken to for a talk and the talk was well received.
The German Perl Workshop has a lot of attendees (approx. 130). The fridge was stuffed with Club-Mate (see image below). The social events were great, one of them taking place at the “Computer Game Museum”.

Club-mate, then you know hackers are involved.
I had a great time and I even think my german improved quite a lot. Thanks to the organizers and attendees for letting a foreigner feeling most welcome.
In: Releases
10 Nov 2012This release has been way too long underway, but I finally succeeded in getting it to CPAN.
The release is primarily focused in a number of patches received from Steven van der Vegt, Scott Hardin and Oliver Welter – as before the OpenXPKI project contributes with patches lifting Workflow to a new level.
Now remains a lot of work on getting the distribution stabilized. The documentation needs an overhaul. I would like to migrate the test-suite to Test::Class.
The RT queue is down to 3 issues and it would be magnificent to get the last feature requests implemented.
The following information is lifted from the Changes file:
- Applied patches from Scott Hardin implementing lazy evaluation of conditions
- Applied patch from Oliver Welter implementing support for multiple factories:
https://rt.cpan.org/Public/Bug/Display.html?id=18159
- Added patch from Oliver Welter implementing the feature of creating custom workflow classes, in addition a patch to silence some warning emitted during test from Workflow::Validator
- Added patch from Scott Hardin implementing nested conditions
- Added patch from Steven van der Vegt RT #52841 implementing auto run for the INITIAL state:
https://rt.cpan.org/Ticket/Display.html?id=52841
- Added patch from Steven van der Vegt RT #52862 improving the reporting on validation exceptions:
https://rt.cpan.org/Ticket/Display.html?id=52862
- Eliminated README and migrated information into the main POD and introduced INSTALL file for the installation relevant information. README is now generated from the main POD by Build.PL
In: Retweets
4 Nov 2012I have decided to migrate my tweet and retweet posts from my open source blog to my company blog. The truth else is that now much would not happen there and the contents of the posts are not necessarily open source related.
The post for week 44 is available now.
jonasbn
In: Events
16 Oct 2012Just back from the Nordic Perl Workshop 2012 in Stockholm, Sweden.
It has been quite some time since I have attended a Perl community event, so it felt awesome to see old friends again and at the same time meeting new people.
The Nordic Perl Workshop 2012 was arranged by Claes Jakobsson, who always set up a nice 1 track setting, so you do not have the dilemma of choosing between tracks. You can settle in one room and you are then exposed to talks you might would have skipped, a very elegant way to arrange a workshop in my opinion.
The Nordic Perl Workshops in Stockholm have always been my favorites since the atmosphere is very intimate and by the end of the workshop you end up have talked to practically all attendees.
The 2012 workshop was no disappointment, the program was varied, with different speakers covering a wide variation of topics.
- Jonathan Worthington on Perl 6 modules and
- Claes on Perl 5 topics related to parsing and debugging
- Salve Nilson on communities
- Ulrich Wisser on Perl::Critic and a very interesting talk on SASL and related
- Me on Stackato
- And of course Damian Conway on Perl 5 regular expressions and most impressive regular expression debugger: Regexp::Debugger
Unfortunately I had to leave prior to hearing the last talks and I am sure I missed out on some good talks, but a national holiday back home in Denmark required my presence for a family holiday.
In addition to the marvelous talks I had great conversations with other attendees on topics like SOA architecture, Perl culture and on software development methodology and practices. The workshop was compact, but as always immensely educational and fun.
We are considering having the Nordic Perl Workshop 2013 in Copenhagen – I hope we will be able to do just as good a job as Claes and the Stockholm Perl Mongers (sorry Salve Meetup).
In: Articles
14 Oct 2012Textmate is a marvelous text editor for programming and other text based tasks on OSX. It even has a great extension for assisting when programming Perl. One of the really helpful features is a syntax validation happening when a file is saved.
Take for example this incomplete Perl source file below

If you specify the contents as perl (see the bottom of the window) or let Textmate resolve this Textmate will evaluate the contents when I save and get an error due to the very obvious syntax error in line 3.

Correcting the contents of the file, will give me status indicating an evaluation success.

This is really nifty most of the time, but I ran into a problem.
I am using App::perlbrew (perlbrew) to handle my local Perl installations. Perlbrew is a magnificent tool and it lets me install several different Perl interpreters in parallel. So I can evaluate my code using different versions of Perl.
The check executed by Textmate is handled by a script named: perlcheckmate.pl (available on Github) and it relies solely on the system perl installed in /usr/bin.
So when I work on a project requiring a newer (or older) version and I then use Perlbrew to satisfy this, I have to install external dependencies with two Perls – not exactly optimal also because I am not interested in maintaining and feeding all sort of crazy modules to my system Perl, just because I am working on some project.
Luckily adjusting perlcheckmate.pl to recognize and use perlbrew is quite easy.
perlbrew sets some environment variables when active:
When perlbrew is active these variables will have content, if not or not installed, existing behavior should be preserved – and not everyone uses perlbrew.
So if PERLBREW_PERL is defined we have a Perl interpreter controlled by perlbrew and we can adjust accordingly. See lines 34 to 42. So We define our Perl interpreter to point to this instead of the Perl interpreter located in /usr/bin.
- #!/usr/bin/perl
- use strict;
- # cwd should be $™_DIRECTORY
- # filename to check is $ARGV[0]
- my $file = $ARGV[0];
- my %file_source;
- sub read_source {
- my $file_source;
- my $path = $file;
- if (!-f $path || !File::Spec->file_name_is_absolute($path)) {
- $path = File::Spec->rel2abs($path, $ENV{™_DIRECTORY});
- if (!-e $path) {
- my $base = File::Basename::basename($path);
- foreach (@INC) {
- my $file = File::Spec->catfile($_, $base);
- $path = $file, last if -e $file;
- }
- }
- }
- $file_source{$file} = { source => \@file_source, path => $path };
- }
- my $perl;
- if ($PERLBREW_PERL) {
- $perl = “$PERLBREW_ROOT/perls/$PERLBREW_PERL/bin/perl”;
- } else {
- $perl = ‘perl’;
- }
- my @lines = `”$perl” -Tcw “$file” 2>&1`;
- }
- $lines =~ s/&/&/g;
- $lines =~ s/</</g;
- $lines =~ s/>/>/g;
- # link line numbers to source
- $lines =~ s%^((?:.+)[ ]+at[ ]+(.+)[ ]+line[ ]+)(\d+)[.,]%
- my $pre = $1;
- my $file = $2;
- my $lnum = $3;
- my $col;
- if ($pre =~ m/“([^”]+)”/) {
- read_source($file)
- my $source_line = $file_source{$file}{source}[$lnum-1];
- $file = $file_source{$file}{path};
- $col = $col != -1 ? $col + 1 : 0;
- } else {
- read_source($file)
- $file = $file_source{$file}{path};
- }
- }
- $url .= “&column=$col” if $col;
- %gmex;
- my $output = ‘<pre style=“word-wrap: break-word;”>’;
- $output .= $lines;
- $output .= ‘</pre>’;
To make a point on my opinion on the use of system perl. You can have a look at the perlcheckmate.pl script above. This script is an external application, bundled with Textmate and therefor it relies on the presence of perl in /usr/bin in order to work, so this line is perfectly okay and it should work even though the operating system is updated.
If you read the script carefully you can see that the script uses two external components:
These are Perl core modules and they should not give any problems. But if you by some weird coincidence and accidentally change or break these as part of development, you are breaking your toolchain at the same time. Your system perl should be considered a key component in your operating system on most modern operating systems.
Unfortunately I had to skip the first day of the two-day Open Source Days conference, because I did not feel well after the fridays DNSSEC course (notes available).
I was scheduled to give a talk on Stackato, ActiveStates micro-cloud solution, so I was quite determined to go on the second day. I did however take it slow and did not make it to the venue until 11:00, because I wanted to hear the talk by Peter Brodersen on Openstreetmaps.
Peter Brodersen is the man behind Findvej.dk, a service from the pre-Google maps of Denmark era. The map data came from Kort og Matrikelstyrelsen and was data, which previously was available for download, but now no longer is available for free.
Peter now works with OpenStreetmap (openstreetmap.org), which is a map of the world available under a Open Database License. It consists of both graphics and vector data.
Compared to Google maps its use is not restricted license-wise.
And some prominent companies and applications are now using OpenStreetMap data
- Foursquare changed to OpenStreetMap maps from of Google maps
- Apple uses OpenStreetMap data in iPhoto maps
OpenStreetMap operates with some basic data entities:
- Node – single geospatial point
- Way – ordered list of nodes, not necessarily a literal way
- Relation – ordered list of nodes/ways and/or relations
- tag – key=value pairs for all of the above
In addition a lot of meta data (speed limits, opening hours etc.), the project is open and can be regarded as a Wikipedia of maps of streets and related information.
Much of the Danish data part of the dataset are under a government license approved by Kammer Advokaten, and is compatible with Creative Commons and one others.
In general a really feel good presentation and Peter did a good job of presenting the topic. The use of OpenStreetMap in the public sector is expanding and the project is well respected and opens up for a lot of different uses, including many spin-off projects.
My fellow Perl Monger Mads Toftum did a presentation on Apache 2.4 and its new features. Apache is an awesome piece of software. Unfortunately Mads lost his presentation so the presentation was pretty basic and did perhaps not sell the new Apache version to well. Documentation on speed improvements would be nice since many of the new web servers such as nginx are very focused on this aspect.
Apache does however offer a lot of interesting features and some of the features replace old features and Apache is still a giant and contender in the web server competition. Comparing Apache to the other spiffy new web servers might let Apache look monolithic, old and slow and the release cycle and the Apache organization setup might also signal the same – this might not be the truth, but one of Apache’s future challenges could be one of image.
By the end of the day I did a presentation of ActiveStates micro-cloud Stackato, I will follow-up with a separate blog-post on Stackato. ActiveState had kindly donated a single Komodo IDE 7 license.
Being the author of the Perl module Games::Bingo I had implemented a Mojolicious based single number bingo app and deployed this on my Stackato micro-cloud. I gave the people in the room numbers and the winner was one of the organizers of CloudCamp Copenhagen. She was so kind as to invite me to give a lightning talk at CloudCamp Copenhagen, which is a part of the GOTO Copenhagen Software development conference, where I am participating anyway – so this I am looking very much forward to.
Congratulations to Maja with her Komodo IDE 7 license and congratulations to all the people involved in Open Source Days with yet another successful conference.
In: Releases
31 Jan 2012My friend, colleague and fellow Copenhagen Perl Monger Asbjørn Thegler reported a bug with Business::DK::Phonenumber (BDKPHN-10).
Looking at the code we found out that parts of it made no sense. Asbjørn provided me with a good example demonstrating the bug, so this was quickly translated to a test (BDKPHN-10) and the non-sense code and the issue could be addressed.
The release has been uploaded to PAUSE and should be available on CPAN.
Thanks to Asbjørn for reporting the bug.
jonasbn, Copenhagen
PS. this post was cross-posted from the project blog on Business::DK::Phonenumber
In: Releases
27 Dec 2011First release of Task::Jenkins have been uploaded to PAUSE and it should be available via your local CPAN mirror by the time of publication of this post or shortly hereafter.
Task::Jenkins is a collection of distributions for continuous integration using Jenkins it installs a collection of distributions which have been identified as useful in utilizing Jenkins for continuous integration of Perl distributions, applications and code.
The key concept in the use of Jenkins for Perl is enabling the existing tool chain with minor adjustments.
The basic requirements are that you are using some sort of build system, basically you just need some way to initiate an execution of you test suite from a command line. The test suite is then expected to output to the console so the output from the test run can be inspected and the return value of the test run can be used to indicate whether the test run was a success or failure.
Using standard tool chain components like Test::Harness works out of the box.
For a tutorial on how to get started please see the wiki page on Continuous Integration with Perl.
The distribution is a Task based distribution, so it does not contain any code as such, but simply bundles existing distributions for easy handling. Currently Task::Jenkins contain:
- App::Prove
- Devel::Cover
- TAP::Formatter::JUnit
Suggestions, feedback, patches etc. most welcome,
jonasbn
PS. this post was cross-posted from the project blog on Task::Jenkins
This blog acts as a channel for communicating logicLAB’s open source activities. Announcements on open source initiatives, involvements and releases of open source distributions of software products, projects and applications.