CPAN Release WWW::DanDomain 0.02, now with caching of retrieved data

The latest release of WWW::DanDomain has just been uploaded to PAUSE. The release is a feature release and the main improvement is caching.

As described earlier, when announcing the release of version 0.01, the module is used to handle a lot of data streams and some of them even rely on the same foundation. So caching seemed like a sane idea instead of building a multiplexer, which would fetch the data and then process the data for the different targets. The latter in general a sane solution, but implementing caching was both easy and seemed like good first shot at a solution.

The lucky thing was really that WWW::Mechanize the core module we use in WWW::DanDomain has a cousin WWW::Mechanize::Cached, which implements the same interface and therefor was easy to plug in.

In addition to the caching, the distribution now utilized Test::Prereq as part of its test suite. Unfortunately I again released a distribution (version 0.01), which did not have all requirements specified properly. This can be see from the smoke tests. Please see the blog entry on the same topic for another distribution for a more thorough explanation, there is no need to repeat it here.

I would much rather raise the attention to brian d foy’s Test::Prereq. This marvelous module actually assists me in not making this mistake again. So release 0.02 of WWW::DanDomain now contains a test, which check all requirements listed in the source code.

The only problem I have with Test::Prereq is its speed. It is quite slow, which btw. it quite understandable if you consider what it does. So instead of using it as part of the normal test suite, which I try to run as frequently as possible when developing, I classified the test as an author test.

The author test concept is using for special tests, which are used by CPAN contributors. The normal things is simply to let a some of the tests be controlled by an environment variable namely TEST_AUTHOR.

These tests only make sense to run for the author. So smoke testers and end-users do not need to run these, since the remaining test suites and build tools will make sure that the requirements are met or at least tested.

I sent a patch to brian d foy, via Github, where Test::Prereq is hosted and it was applied. But for those of you who cannot wait for brian d foy’s next release I will visualize my little contribution right here.

[codesyntax lang=“perl”]


# $Id: prerequisites.t 6328 2009-08-16 11:51:16Z jonasbn $

use strict;
use warnings;
use Test::More;
eval “use Test::Prereq::Build”;

my $msg;

if ($@) {
$msg = ‘Test::Prereq::Build required to test dependencies’;
} elsif (not $ENV{TEST_AUTHOR}) {
$msg = ‘Author test. Set $ENV{TEST_AUTHOR} to a true value to run.’;

plan skip_all => $msg if $msg;



CPAN Release WWW::DanDomain 0.02, now with caching of retrieved data

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s