Andreas Jacobsen's Distraction

Another cause of procrastination

Posts Tagged ‘real-world

Finding the name of a Perl sub routine from its reference

leave a comment »

While mucking around with Perl’s Test::Simple I needed to find out the name of a sub routine from a reference. While there are several answers, finding any useful ones by the usual means was difficult. The one I landed on was using Sub::Identify, which provides the routine sub_name($) that solves the problem nicely.

Here’s some example code:

perl -MSub::Identify -e 'sub bar{return "baz"};$foo=\&bar;print Sub::Identify::sub_name($foo). "\n"'

This correctly prints “bar”.

Written by Andreas

November 17, 2009 at 12:54

Posted in Tips & Tricks

Tagged with

Jonas Bonér on real-world Scala

leave a comment »

Jonas Bonér has posted an introduction to a series about how his company has used Scala for their product. I’m looking forward to reading the series. Worth noting is that he said his team picked up Scala quite quickly.

I’m very much looking forward to reading about the best practices and design choices they made. I’d also like to hear about how they dealt with their Java stack. Specifically, whether they put anything between the Java frameworks or called them directly from their Scala application.

Written by Andreas

October 2, 2008 at 10:18

Posted in JVM Languages

Tagged with ,

Follow

Get every new post delivered to your Inbox.