Articles tagged “CPAN”

Tries and Text::Match::FastAlternatives

Published at 17:01, Tue 6 May 2008

I’ve just released version 1.00 of my Text::Match::FastAlternatives Perl module. Since I’m apparently declaring it stable, I thought it was worth writing up a description of what it does, and how it does it.

Suppose you have a large list of strings, and a set of keys, and you need to determine, for each of the strings, whether any of the keys occur in it. For example, the list of strings might be a list of user-agent headers sent to a web server, and the keys a set of strings that are good indicators of robots accessing your site; you want to calculate some server statistics, but disregard any robotic traffic.

How do you go about doing that?

More…

Software tools and cross products

Published at 12:42, Thu 14 Feb 2008

A colleague approached me today regarding a unit test he was writing. He was constructing a series of test cases from a data structure; his code at the time used a multi-line string of which each line had several fields which together described a test to run.

More…

Accidental remote-control module authoring

Published at 00:46, Fri 28 Dec 2007

I seem to have accidentally written a CPAN module, and by remote control at that.

There’s been some discussion on p5p about perhaps making the next stable version of Perl (version 5.12) automatically enable strictures (and maybe even warnings).

More…