THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

perl-achievements

I already knew about git-achievements (and partake in the fun). But earlier this week Dean showed me Unit Testing Achievements.

My first thought after seeing it was: “cool, I want to port that to Smolder!”. My second thought was: “hey, if we can do it for Git, and for testing, why not for Perl itself?” Perl::Critic and Perl::Tidy already use PPI for their magic, surely it wouldn’t be too hard to harness its power for a little bit of fun?

And, indeed, it wasn’t:

[yanick@enkidu ~]$ cat foo.pl
print "Hello world", $/;

[yanick@enkidu ~]$ alias perl="perl-achievements -r --"

[yanick@enkidu ~]$ perl foo.pl
Congrats! You have unlocked 1 new achievement

************************************************************
*** Cryptomancer
*** Level 1

Used Perl magic variables.

Variables used: $/
************************************************************
Hello world

The code for this new Perl::Achievements is on Github. For now I was only aiming at churning out a prototype, so the code’s a mess, there’s no documentation whatsoever, and there are only two achievements to unlock. Buuut if I have time, and if it amuses peoples, it would be easy to make it grow into something a little more… interesting.

Leave a Reply

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @FN_Press2: Schooner Information Technology Teams with Pythian to Deliver Advanced Support and High... http://finanznachrichten.de/20
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more