Improved Syntax Highlighting in the Debugger

You may recall me writing about DB::Color a few years ago. That module let you do this with the debugger:

Perl Debugger with Syntax Highlighting

It has some issues, including the fact that syntax highlighting Perl code is, um, not always perfect, but it does the job. The main drawback, however, is that it runs about as fast as a sloth with a spinal injury. It was so bad that even I stopped using it, and I love the damned thing. Today, I may have fixed that.

Divas Need Not Apply

A couple of days ago, we posted a job on We wrote:

Description: Want a remote Perl job working for a great company with colleagues from all around the world? We're considering both permanent and contract positions for a variety of Perl roles. Front-end skills are always welcome and experience with parallel programming comes in handy more than you would think.

We do set a high bar on who we employ, so if joining a bunch of Perl hackers who love the language sounds like fun, send us your CV and we'll send you our programming test. In return, because we value your time, Ovid will be evaluating the test and will send you feedback on how you did and areas for improvement, if any.

Desired skills: Perl. Strong Perl. You love the language. This is the only solid requirement.

Front-end skills (HTML, CSS, JS, not design) are often very useful.

Expertise with parallel processing, including event-driven programming, is needed.

Good communication skills.

Understanding databases is important.

The specifics of the job are vague because there's more than one position (and NDAs), but the requirements are reasonably clear. Note that as of this writing, we posted that two days ago, and that's when the fun began (and if I grade another Perl test, I'm going to scream, but boy, does that weed out candidates quickly).

Improved DBIx::Class usage with arbitrary SQL

A few months ago I write about using arbitrary SQL to generate DBIx::Class resultsets. These DBIx::Class::Report resultsets are read-only, but I found that I needed to add additional methods to each result and now I can. This makes the software much more flexible.

Fluent interfaces in Perl 6

I've been digging into Perl 6 more lately and I noticed the Wikipedia example of fluent interfaces didn't have a Perl 6 example, so I fixed that.

To be fair, Martin Fowler's explanation (as usual) of fluent interfaces does a much better job of explaining them, but a key point is that setters have a return value. For many fluent interfaces, the setters set a value and actually return a new instance of a different object for you to call methods on. Thus, the examples in Wikipedia don't always meet the criteria of a fluent interface, but I added a Perl 6 version that closely modeled the PHP version (but more concisely, and with much better type safety). I sidestepped the entire fluent interface debate.

Dave Cross and Modern PERL

At this year's YAPC::EU, we've been having a blast in Granada, Spain, an incredibly beautiful city. The conference has been fun and Dave Cross gave a great lightning talk about Modern PERL (sic). These are devs who are using 5.8, often aren't allowed to use modules, and use for param handling, but print cookies manually. In a similar spirit, I present a subroutine from some client code. It's here with their permission, and it's one of reasons they've hired All Around The World to fix their system. Pay close attention to the sprintf lines.


sub getDate {

       my $DATE = "0";
       # Get the date
       ($day, $month, $year, $hour, $min, $sec) = (localtime)[3, 4, 5, 2, 1, 0];

       # Reformat numbers to have two digits
       $day = sprintf ( "%.2d", $day % 100 );
       $month = sprintf ( "%.2d", ($month++) % 100 );
       $hour = sprintf ( "%.2d", $hour % 100 );
       $min = sprintf ( "%.2d", $min % 100 );
       $sec = sprintf ( "%.2d", $sec % 100 );

       # Fix the year
       $year = $year + 1900;

       # Format the date.
       $DATE = "$day$month$year$hour$min$sec";

       # Return the date
       return $DATE;

I should add that this is some of the nicer code in their system.

About Ovid

user-pic Freelance Perl/Testing/Agile consultant and trainer. See for our services. If you have a problem with Perl, we will solve it for you. And don't forget to buy my book!