rjbs forgot what he was saying

not logged in (root) | by date | tagcloud | help | login

new minicpan trial release

by rjbs, created 2011-04-26 09:06
last modified 2011-04-26 12:52
tagged with: @markup:md cpan journal perl programming

Part of my work at the QA Hackathon led to making it quite a lot easier to test minicpan. I'm pretty happy with that, and got to work writing tests. Once I had the basic "mirroring works" tests written, I wanted to have a quick look at testing logging. Unfortunately, it turned out that logging was a big mess.

The log level was determined by three pseudo-boolean flags: errors, trace, and quiet. Their interaction was not well-explained, and I say pseudo-boolean because trace, at least, had three different behaviors: set to true, set to false, or unset. It was a big mess, and to emulate CPAN::Mini's behavior, subclasses would have to look at the object guts. Ugh.

I rewrote the logging methods and tried to keep them very simple, but it may be that somebody who was copying code from CPAN::Mini in a subclass has now got broken code. The basic changes are:

I also wrote my first batch of tests for processing config files and command line options. This exposed a few minor bugs, and I look forward to writing more, and then updating the documentation to finally explain how it all works. I also wouldn't mind refactoring the goofy current initialization implementation. It's not pretty.

Anyway, I expect that the new trial release of CPAN::Mini, v1.111004, will not cause anybody any serious problems, but I'll give it a few days before I promote it to a stable release.