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
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.