March 2016 Archives

It's never too late to find a bug

For the last five years, the version comparison code in Git::Repository started with this:

my ( $r, $v, @o ) = ( shift, ( grep !ref, @_ )[0], grep ref, @_ );

The above line looks clever (that's probably why I wrote it that way in the first place), but it also has a subtle bug.

About BooK

user-pic Pink.