February 2010 Archives

While I'm on the subject of shell scripting ...

How often have you wanted to cut n paste a module name from some error message onto the command line and just edit the damned file? Isn't it a huge pain in the arse changing all the :: into slashes?
function vi {
VI=/usr/bin/vim
INARGS=("$@")
OUTARGS=()
for i in ${INARGS[@]}; do
if echo $i|grep ::>/dev/null; then
OUTARGS=(${OUTARGS[@]} `echo $i.pm|sed 's/::/\//g'`)
else
OUTARGS=(${OUTARGS[@]} $i)
fi
done
$VI ${OUTARGS[@]}
}

Th…

Tools to solve perly problems

So, you've got a problem with something perlish. What language do you use to solve it?

My particular problem is that my CPAN-testing machines were all fed off CPAN's RECENT file (eg http://www.cpan.org/RECENT), which would update every few hours. This is apparently no longer being updated, instead there's a much more up-to-date YAML file (http://www.cpan.org/authors/RECENT.recent) that updates within seconds of something hitting the PAUSE. But my ugly lash-up of shell scripts expects the old format, so what's a boy to do?

I *could* write some perl that uses LWP::Simple and …

cpXXXan

Some of you will be aware of one of my projects that is driven off CPAN-testers data: the cpXXXan. Well, I'm in the process of extending it. Soon it will grow a cpNETBSDan tentacle, and likewise for some other OSes. Once I'm convinced that it works and is reasonably efficient, I'll probably make it so that you can filter by both OS and perl version, using hostnames such as irix.cp5.8.9an.barnyard.co.uk.

Number::Phone::UK update

Number::Phone::UK no longer assumes that geographic numbers terminate on fixed lines - as VOIP services grow and grow, this assumption no longer makes sense. So as of version 1.7004 of Number-Phone, is_fixed_line() will return undef for geographic numbers and 0 for mobiles, the latter being the only type of number that we know doesn't terminate on a fixed line.

There are no significant code changes though, this is really just a database update, hence the tiny increase in the ve…

Sub::WrapPackages bugfix

Lee Johnson found a bug in Sub::WrapPackages. It's to do with how perl 5.10 optimises stuff exported by 'use constant'. He provided a patch and test, so a bugfixed version is on its way to the CPAN.

Even more CPANdeps stuff

Added a coupla features over the weekend. First, you can collapse and expand parts of the tree if you have Javascript and CSS turned on. Second, now that CPANTS's tool for finding what distributions depend on a given distribution no longer works, I've implemented it myself. It's a bit ergonomically crude, but is more accurate than CPANTS was.

More CPANdeps jibber-jabber

Another coupla small updates to CPANdeps.

First, you can now collapse parts of the tree.

Second, a small bugfix for distributions with weirdo version.pm-stylee v1.2.3 versions. Thes dists are buggy, of course, as version *numbers* should be, well, they should be *numbers*. But as they're on the CPAN, I have to support them.

Now, can someone explain why this 'ere form what I'm filling in has seperate fields for "tags" and "keywords"? I thought that "tag" was just a stupid web 2.0 neologism for "keyword", so why are they seperate?

CPANdeps upgrade

While you won't notice any changes, there have been biiiig upgrades at CPANdeps. Here's the diff.

Until now, it's used a SQLite database of test results that I downloaded every day and then mangled a bit to do things like add some necessary indices, figure out which reports are from dev versions of perl, and so on. That worked really well back in the summer of 2007, when there were only half a million reports in the datab…

About David Cantrell

user-pic I'm in yur test resultz analyzn yr failz