Monday, 27 December 2010

A 2010 filled with Perls

2010 is almost over, and I figured it's time for a retrospective of yet another awesome year for the Perl programming language and its worldwide communities. I tried making this list as complete as possible, but it's of course my own point of view, so feel free to add anything you feel I've missed on the comments below, or in your own blog post.

So, without further ado, here are (my) highlights of the Perl world in 2010!


The year started with Perl Oasis, the traditional conference in Florida, USA, in a full day packed with great talks!

The Bulgarian Perl Workshop in Sofia also had some very nice practical talks about modern Perl topics.

Viacheslav Tykhanovskyi released Text::Haml, a Perl renderer for the increasingly popular Haml templates born in the Ruby/Rails world. The popularity is spreading fast, and there are already views for it in Catalyst, Mojolicious and Dancer.


Frozen Perl, a three-day event in Minnesota, USA, this year also had two Perl classes and a hackathon. Very nice!

On the other side of the world, the Perlburg Workshop in Yekaterinburg, Russia, was also packed with talks on several modern Perl topics.

The first version of perlbrew was released! What an amazing tool by Kang-min Liu, letting you manage several different perl installations in your home dir. Feels like forever, right?

How about cpanm, yet another incredible miyagawa-ware, proving to be an excellent lightweight alternative for installing Perl modules. It also made its debut to CPAN in February, and now you can even do curl -L | perl - $MODULE. Soo sexy!

Tools like these two and local::lib make us wonder how did we live before them :-)

In fact, speaking of Miyagawa, man was he on fire or what this month?! February also marked the release of Starman, a high-performance preforking PSGI/Plack web server. It fits so nicely it's now used in production everywhere.

Last but most certainly not least, David Mitchell submitted a grant proposal to The Perl Foundation, to fix bugs in core Perl 5. It was a huge success, and over the year he worked for more than 500 hours and closed 127(!!) tickets.


The Perl 6 Hackathon in Copenhagen, Denmark, raised a lot of awareness around Perl 6, showed practical examples and offered a hands-on experience to all attendants.

Perl also made a huge appearance in Germany at CeBIT, the world's largest computer expo, showcasing modern Perl solutions like Moose, Catalyst and DBIx::Class to over 8000 individual developers and companies from all around the globe, not to mention products such as Foswiki, and OTRS. Nice marketing, Perl::Staff! :-)

Moose 1.0 was released to the world! Now, I know Moose has been stable and production ready for a few years now, being the de-facto way to create and manipulate objects in modern Perl, and the only reason 1.0 was released was because they ran out of two-digit numbers. Either way, it looks nice and might make some enterprise people subconsciously more comfortable using it ;-)

March is the month of the first Equinox of the year, and the São Paulo Perl Mongers in Brazil celebrated the date with a calendar of Perl articles in portuguese, contributed by developers all over the country, just like the traditional advent calendars in december.


Perl 5 release 12 was finally out of the oven! And what a great improvement it was, with default strictness, Unicode overhaul, Y2038 compliance, pluggable keywords, and much more!

The Perl QA Hackathon in Vienna, Austria, gathered around 30 people in 3 full days of intense (and happy!) hacking, culminating in several improvements on the already great Quality Assurance tools for Perl, including Devel::Cover, Test::Smoke and Test::Harness.

Bugzilla 3.6 was released, offering exciting new features for users and administrators, including migration tools, a simple "Browse" interface, lots of usability improvements and drop-in extensions.

Josheph Hall and brian d foy did it again, and the second edition of Effective Perl Programming is better than ever, showing real problems and real solutions, just like the companion website. What are you waiting for, go get it now!

The unbelievably fast Text::Xslate templating system by Goro Fuji was released on an unsuspecting world. It's up to 158X faster (!!) than everyone's favorite Template::Toolkit, and provides a compatibility layer letting you use TT2's syntax and virtual methods if you want. Also, there are already views available for your Catalyst, Mojolicious and Dancer web apps.


DevConf, a major conference in Russia gathering over a thousand professional web developers, had a full track just for Perl!. And of course, the Russian Perl Community was amazing as usual and provided several nice talks for DevConf::Perl.


Wow, this month was filled with Perl conferences! Portuguese Perl Workshop, German Perl Workshop, Belgian Perl Workshop, each of them filled with nice talks and courses.

YAPC::Russia this year happened in Kiev together with Perl Mova, the Ukrainian Perl Workshop, and was another huge success.

And speaking of huge successes, June is not over until after YAPC::NA. The greatest Perl conference in the Americas happened for a full week in Ohio, USA, and had over 130 talks!


Following the mid-year sprint of Perl events, we also had the São Paulo Perl Workshop in Brazil, and the Warsaw Perl Workshop in Poland.

Rakudo Star was released! It's a useful - and usable! - implementation of the Perl 6 language specification.

Goro Fuji released the first version of Text::Clevery, a Text::Xslate subclass allowing developers using PHP's Smarty template syntax.

Gabriel Weinberg released DuckDuckGo's community website. I already wrote a bit about the amazing (and amazingly fast) DuckDuckGo search engine, and if you never used it, now is the perfect time. But beware: you might never return to Google search. I know I haven't ;-)

July also marked the second birthday of Padre, the Perl IDE. For a whole weekend, Padre developers, users, friends and well-wishers joined a huge party and hackathon.

FISL 11, the largest opensource event in Latin America, gathered over 7000 developers, enthusiasts and companies in Porto Alegre, Brazil. We had a very busy Perl stand there, and made a contest on the conference's big screen of an arcade zombie game developed live during the conference using SDL Perl. It was lots of fun!


YAPC::EU, "The Renaissance of Perl", joined Perl developers from all over the world in Pisa, Italy, with over 100 amazing talks and 14 tracks! They even had a cooking contest after the conference =P


JT Smith and crew released Lacuna Expanse, a highly addictive free massive multiplayer online (MMO) deep space empire strategy simulator (phew!) written in Modern Perl. It also has a public API, and people even hacked a new client for automated tasks. If you haven't played it yet, do it. Now. It's even integrated to Facebook, so if you have an account there, you don't even need to create a login.

Speaking of games, SDL Manual was started by Kartik Thakore in yet another grant by The Perl Foundation. It's not done yet, but it's the first real documentation of the new API, and already contains tons of code examples and complete game tutorials in Perl.


This month we had not one, but two other YAPCs!

The ever great YAPC::Asia in Tokyo went along for 3 days filled with the most awesome talks, and broke a new record: over 500 attendants!! How cool is that?!

On the other side of the world, YAPC::Brazil made its second appearance as a standalone conference in the beautiful city of Fortaleza, with around 100 of people attending online and on-site.

The Facebook SDK distribution was revived by Torsten Raudssus, giving a better overview on how to dive into the Facebook platform using the long existing modules to access the Facebook API via Graph or REST. Many Perl developers are active in social networks (writing robots for Twitter is a real breeze with modern Perl), so if you missed it now is the perfect time to get on board ;)


The Blekko search engine was released, offering a neat /slashtag syntax that lets you get the most relevant results in a heartbeat. It's great to see so many new companies relying on modern Perl for their core businesses. Give it a try, and slash the web!

Following the events calendar, the Austrian Perl Workshop opened november with a 2-day conference filled with great talks.

There was also Nordic Perl Workshop, organized by the Icelandic Society For Digital Freedoms in Reykjavik. It's the first time the NPW is held in Iceland, proving that volcanic eruptions may shut down an entire continent's airspace, but the camels will just keep strolling like it's a morning fog ;-)

With the second Equinox of the year, the São Paulo Perl Mongers arranged another sprint of modern Perl articles in portuguese, written by the entire Brazilian community.

Finally, after a lot of expectation from the worldwide Perl community, chromatic's Modern Perl book was finally out! As far as I can tell it's the best reference for modern Perl coding today, and an excellent read. I honestly think it's an amazing learning and reference material, and might prove insightful even to the most seasoned programmer. So go buy it now!


The always amazing London Perl Workshop happened on the 4th and proved once again to be an enormous success, including a talk by Spiros Denaxas about how Perl was used in medical research and epidemiology to help cure coronary heart disease.

On the 18th - Perl's birthday! - there was the Sixth Russian Perl Workshop, Saint Perl 2, in the lovely St. Petersburg, also filled with talks in Russian and English for all audiences, for free.

Perlbal::Manual, a complete manual for the highly used Perlbal reverse proxy and load balancer, was published by Bruno Martins and José Castro. Yay!

Mojolicious 1.0 was finally released, and it really makes web development fun - specially Mojolicious::Lite!

Speaking of fun lite web frameworks, the Dancer Advent Calendar made its debut this year, with several articles teaching you how to do things with Dancer, from testing and managing database connections to creating a tiny blog!

All other already traditional Perl, Perl6, Catalyst, RJBS's, and JPerl Advent Calendars are most definitively praise-worthy and were responsible for over 300(!!) new articles on Perl and its modules, with tons of awesome tips and cookbooks this month only! In fact, the Japanese Perl community is so freaking amazing they had 8 (that's right, EIGHT) tracks on their Advent Calendar, so JPerl alone was responsible for 200 articles this month. すごい!!

Wow, so much in just a year! I can't even begin to imagine all the wonderful things that are going to pop up in 2011!

See you there :-)

Wednesday, 6 October 2010

Perl and Online Communities

Today, the ever amazing xkcd released a new map of online communities. Until last year or so, most of the Perl community resided on "email land". Granted, it's a huge place, but not so pretty, and foreigners probably needed a visa to enter - or at least someone inside to give you directions and keep you out of trouble. Oh, we also have our cozy and warm "irc isles", but let's face it: it's not that big an empire.

Then the Ironman Challenge came, and people followed. Or, rather, blogged. And what a great thing it is! Our brave explores went out of their comfort zones and right into the blogosphere core, planting the camel flag and claiming more ground for Perl.

Lots of us also settled on the huge Twitter continent, showcasing Perl to contacts and followers. Others have decided to head north and are now bravely fighting the flames of Reddit, Digg and several other web forums, getting more and more Perl news out of the annoying old myths and into the Slashdot effect - and what a nice bootstrapping this is, being that Slashdot itself is written in Perl!

What lies ahead? Right now, the great (and greatly addictive) Lacuna Expanse game is taking Modern Perl straight right into the "MMO Isle", where I'm sure very nice things await. It's the new land of opportunity for Perl apps. And it's already integrated to Facebook, another promising shore for the Perl programming language and its ever growing community.

Now if you excuse me, I have a Spy Pod waiting to be launched against the evil Perigrin's Estate. Erm, I mean... work, yeah. ;-)

One Click Installers for Perl Web Apps on Dreamhost

Love it or hate it, Dreamhost is one of the most popular web hosting services out there. One of the reasons is their one-click install feature, letting people install opensource software for their web publishing needs like Wordpress, MediaWiki, Trac, Drupal and several others, automatically.

Now it's our chance to add some Perl apps there too! If you are part of an app's community, Dreamhost created a "One-click installer" submitter form for developers, where you can add your app up for evaluation. In their own words, it's "a unique chance to get some great exposure; thousands of DreamHost customers would see it every day!"

How about it, then? MovableType? Melody? MojoMojo? From what I can tell, everyone is welcome - just fill the form (you will need to provide a contact email) and cross your fingers :)

And if you really want to get to them, it appears they are starting an experimental program with all the developers using Dreamhost. Just sign in their developer mailing list.

What I would really want to see from Dreamhost is Catalyst already installed - or at least a lighter/simpler framework like Mojolicious/Mojolicious::Lite or Dancer. They already come with Rails support, so why not Perl as well? Spread the word, let's make some noise! :D

Sunday, 1 August 2010

Bringing Worldwide Perl Communities Together

A couple of weeks ago I had this very nice talk with Daisuke Maki, Gábor Szabó and Kenichi Ishigaki about Perl communities worldwide. These days, as once was with french, and german, and latin, if you want to be heard in a wider audience, you have to speak (or, in this case, write) in english.

But what goes around in english doesn't necessarily reflect what's actually happening worldwide. Wikipedia estimates only 400 million people having english as their first language, and something between 500 million to 1.8 billion speakers overall. In a world of little less than 7 billion people, you can see how a lot of information may be lost.

In fact, as Ishigaki-san pointed out, a lot happens where most of the non-speakers don't know. This is true for both the japanese and brazilian communities, and I'm pretty sure it is also true for a lot of other communities where the native language is not english. It's not some bizarre sort of protectionism or xenophobia; there is just too much going on with too few having/taking the time to show them off to the unsuspecting, english-speaking, world.

Not that everyone would care, of course. But some might (I know I do, and Gábor does, too). Besides, as Maki-san mentioned, it might be interesting not to be completely clueless about what happens in other communities, even if some of those things are too regional to be useful outside the local Perl Monger group.

While events such as the imminent YAPC::EU, are an awesome opportunity to hear about what's going on with several different Perl groups, a lot of us can't make it to Europe, and the language barrier still poses an issue.

Some movement is already there to achieve this sort of integration and spread the Perl word across idiom barriers. Fayland wrote and uploaded to CPAN a Perl Book in Chinese, so Perl would easier reach the Chinese Community. I believe Shawn Moore's comment in that module's ratings goes a long way. Speaking of Chinese Community, did you know last year they even made a Perl Advent Calendar?

There's also an ongoing attempt to translate documentation and make perldoc aware of localization. Translations in French, Italian, Lithuan, and Brazilian Portuguese are already on CPAN. And Ishigaki's Acme::CPANAuthors quickly became a huge success - I'm actually proud of being one of the early adopters - offering a way for Japanese, Brazilian, Russian, Ukrainian, British, Icelandic, Norwegian, French, Canadian, Korean, Italian, Taiwanese, Turkish, Portuguese, Israeli, Indonesian, German, Dutch, Chinese, and Austrian authors to know a bit more about each other. And I'm sure more are on their way!

So, just as I often try to make people here in Brazil aware of what's going on in the worldwide Perl community, in the next few posts I'll take some time to go the other way around, and broadcast a little of what's going on in these parts to whomever is listening.

I'd also really like to know more about *your* local Perl Mongers group. After all, we do speak the same language, and that is Perl ;-)

So, what have you guys been up to?

Tuesday, 27 July 2010

DuckDuckGo, a *fast* and *awesome* web search engine (in Perl!)

More than often we hear people in the Perl community asking for more Perl applications and solutions instead of just modules. Well, Gabriel Weinberg (YEGG, on CPAN) did just that!

His new creation is called DuckDuckGo (DDG for short), a search engine with lots of cool features, like:

  • It's blazing fast! Google's search results doesn't quite make it for me, but I could get to the "right" result in the list (even in other pages) really fast, so is was one of the biggest blockers for me in switching to other engines. No more :-)

  • Official sites are labelled and displayed on top.

  • No ads above results, and actual privacy! Unlike Google, DDG does not track users, nor displays "sponsored links" on top of your search.

  • Zero-click info is an amazing way to find what you're looking for in your search without having to follow any links. Let DDG do the hard work for you!

  • Several goodies ready for you: go to the first result prepending a "!" to your search, find your IP address by simply querying "ip", get random numbers, test a regexp, and much, much more!

  • site:, filetype:, inurl:, AND, OR, and all your favorite advanced operators work too!

  • Keyboard shortcuts and customizations let you setup fonts, colors and much more! If you don't like to use the mouse, you can do everything via the keyboard.

  • Encrypted search, just use https:// instead of http://
Read the About and FAQ for more features and information, and give it a try. You might be surprised :-)

Want to help promote more Perl-based solutions? Sick and tired of Google search? Switch now!

Oh, did I mention it is **fast** ??


Monday, 14 June 2010

Tweetylicious - a Twitter-like microblogging app in just one file!

So, I've been playing a little with Mojolicious::Lite, and here's what I came up with :-)

Tweetylicious is a small - but rather complete - microblogging web application in a single file! It is meant to demonstrate how easy and fun it is to create your own Web applications using modern Perl 5 and jQuery!

Some features:

  • Multi-user, with homepages, search and list of followers/following
  • Nice, clean, pretty interface (at least I think so :P)
  • User avatar images provided by gravatar
  • Unicode support
  • Well structured, commented code, easy to expand and customize
  • Encrypted online sessions
  • Uses an actual database (SQLite) and stores encrypted user password

If you want it, the full code is in github. Removing just blank lines and comments, the Model has ~80 lines, the Controller ~110 lines, templates ~170 lines, plus ~90 lines of static css and ~60 of static javascript. And that's the whole app :D

How do you run it?

perl daemon

You'll need Mojolicious and ORLite - two very lightweight modules - to run the app, and that's about it! A live Internet connection is also good, since it fetches jQuery on the fly.

Mind you, it's far from perfect (bug reports and patches always welcome!). I wrote it as a demo to show the kind of stuff you can quickly achieve with Perl. It's totally usable and might be a good fit for quick deployment and customization on internal networks, but if you're looking for a business ready microblogging solution, you might want to look at (which powers But it's waaaay bigger ;-P


I tried making the commits linear and modular, so newcomers can take a look at git log for a "tutorial":

  1. initial commit - diff, full file
  2. adding index page (and route) - diff, full file
  3. separating common html into a shareable 'layout' - diff, full file
  4. adding (all) css - sorry, this is not a css tutorial :P - diff, full file
  5. users will need to 'login' and 'join' (register)! - diff, full file
  6. first jQuery contact: turning links into buttons - diff, full file
  7. creating the 'User' model schema in our database - diff, full file
  8. registering users: the template - diff, full file
  9. registering users: the controller - diff, full file
  10. registering users: validating registration data - diff, full file
  11. registering users: prevent usernames that are part of a route - diff, full file
  12. user login: the template (and basic route) - diff, full file
  13. user login: the controller (handling form submission) - diff, full file
  14. user logout: controller, and option in template - diff, full file
  15. the user's homepage (template) - diff, full file
  16. the user's homepage (controller) - diff, full file
  17. adding a 'not found' page - diff, full file
  18. making 'login' and 'join' redirect to user's homepage - diff, full file
  19. updating our model: posts! - diff, full file
  20. making user's homepage show posts (but user can't create them just yet - diff, full file
  21. updating our controller: creating posts - diff, full file
  22. updating our controller: deleting posts - diff, full file
  23. updating our controller: turning common posting auth code into a ladder - diff, full file
  24. more jQuery: styling post submit into a button too - diff, full file
  25. more jQuery: showing how many characters are left in a post - diff, full file
  26. more jQuery: highlighting posts on hover - diff, full file
  27. more jQuery: formatting our content for RTs (@user) - diff, full file
  28. creating posts via Ajax (rather, Ajaj, since we're using JSON ;) - diff, full file
  29. deleting posts via Ajax (rather, Ajaj, since we're using JSON ;) - diff, full file
  30. searching posts: search form template - diff, full file
  31. searching posts: jQuery effects - diff, full file
  32. searching posts: model - diff, full file
  33. searching posts: controller - diff, full file
  34. searching posts: results template - diff, full file
  35. searching posts: jQuery (naive) formatting for topics (#topic) - diff, full file
  36. followers and following: the model - diff, full file
  37. followers and following: the controller - diff, full file
  38. followers and following: template changes - diff, full file
Newer commits will likely be not as organized, and mostly bugfixing, but this should get people going - hopefully :P

Well, that's it. Have fun!

Tuesday, 18 May 2010

Getting back at mst

Hi guys!

Our dear Matt S. Trout's latest blog post is entitled "Exciting days ahead". Oh boy, I'm sure "exciting" is a very nice word. And no, I'm not speaking about the brand new Perl 5.12.1.

See, that post is dated April 14. That's over a month, and as such waaaaay past the Ironman Challenge's 10-day deadline. If I remember correctly, and he made sure to say this over and over again:

"If I lose, I'm gonna let you guys pick a colour and a theme, and I'll do a talk about that theme with my hair dyed on that colour"

Well, folks, it's time to collect!! =)

Note: Granted, mst is a rather polemic character in our community. Love him or hate him, his contributions to modern Perl and to making the Ironman Challenge and the whole Perl blogging initiative the enormous success it is, are completely undeniable. He knows I'm blogging about this right now (though he likely doesn't know about my poor gimp talent) and is about to do a "press conference" on the subject himself - I just found it funny that no one said anything until now! Also, I lost the ironman challenge several times since I entered it, and likely so did you - the whole project of getting the Perl word out there is awesome and I'm sure all of us will keep doing it. The point is, none of us made half-drunk promises about not failing :PP

Friday, 9 April 2010

one-liner tip: aliases

When it comes to bending the system into doing what we want in a quick-and-dirty fashion, nothing beats a Perl one-liner. There are several great tips and talks on one-liners, but they usually focus on Perl itself. Well, turns out I use one liners often enough that I became lazy even to write "perl -...". So I remembered the good old 'alias' shell command and put these in the end of my .bashrc file:

alias pe='perl -E'
alias ppe='perl -pE'
alias pne='perl -nE'
alias pipe='perl -i -pE'
alias pine='perl -i -nE'

that alone saves me a whole lot of typing over the week :)

> pe 'say q[hello, lazyness!]'
> hello, lazyness!

It's also pretty easy to remember, since you just type 'p' for 'perl', followed by the main flags your one-liner has. Oh, and of course you also can pre-load your favorite modules, doing things like:

alias pe='perl -MData::Dumper -lE'

That's it, hope you enjoy it :)

Monday, 18 January 2010

Better output testing HTML and other long strings

If you ever wrote or ran a website test in Perl, you probably used Rafaël Garcia-Suarez's wonderful Test::LongString, even if you never heard of it before. Not only is it used by lots of CPAN modules, it is the foundation of Test::WWW::Mechanize test functions, with flavors for Catalyst, PSGI, CGIApp and several others. But it doesn't have to be HTML content testing - any string output can be tested with its awesome functions.

Maybe Test::LongString's most common function is contains_string(), which you may know as Test::WWW::Mechanize's $mech->content_contains() method. When it fails, the failing test output shows the original string and the text it was trying to find:

# searched: "foo bar"
# can't find: "baz"

Problem is, when the original string is too long, you get only the beginning of it. This happens a lot when you're trying to find content inside HTML, like:

# searched: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Trans"...
# can't find: "some random content"

Such output is only barely useful, and I got fed up of having to edit a test file manually, add diag() calls to see the complete output, then ack for the wanted string to see what went wrong. So I made a small patch to Test::LongString, which Rafaël promptly accepted (yup, he rocks, but we all know that ;-).

Now, whenever such test fails, you'll get two extra lines:

# searched: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Trans"...
# can't find: "some random content"
# LCSS: "ome random content"
# LCSS context: "d="content" class="foo">Some random content!</div>"

"LCSS" stands for Longest Common SubString, meaning you get whatever matched the most inside the original content (note that LCSS is not the same as LCS, or Longest Common Subsequence, which would go for a non-sequential match as seen in diff-like outputs). And, of course, "LCSS context" means the surroundings of the LCSS string just found.

Now, just by looking at our example, we know exactly why the test failed, and we are free to fix either the test suite or the application.

Know what's best? You get all that for free, no need to change a single line in your tests. Just update Test::LongString to 0.12 or later and enjoy! :-)

Monday, 4 January 2010

First CPAN upload of 2010

Hi everyone - happy new year!

2009 came and went, so here's to an amazing 2010 for the Perl world, with even more than we already accomplished last year :-)

And look at that, it's only day 4 of 2010 and we already saw over 200 CPAN uploads. But don't look just yet! See if you can figure out what was the very first package upload to CPAN in 2010 (CPAN-time, of course). No clue? Couldn't care less? Well, call me curious, but I had to look ;-)

January 1st had several heavy competitors: PDL, Chart::Clicker, POE... even Plack was this close from being the one. But our "winner" is a rather young package by Marty O'Brien. I'm talking about Forks::Super, in it's 12th release.

Forks::Super provides new definitions for the Perl functions fork, wait, and waitpid with richer functionality. The new features are designed to make it more convenient to spawn background processes and more convenient to manage them and to get the most out of your system's resources. Take good old fork(), for example. Without arguments, it behaves just like it used to, but now you can also do stuff like:

     my $pid = fork { cmd => [ qw(/bin/prog opt1 $opt2 opt3) ] };
     my $pid = fork { sub => \&subroutine, args => [ @args ] };

Your can even set timeouts on your forks, queue jobs and obtain filehandles. Pretty cool, huh?

I haven't actually used it, but Marty took his time with a very comprehensive Pod, and even some information for windows users. So, if you usually use fork in your programs, be sure to check it out.

Until next time!