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

In: Releases

20 Aug 2009

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.

  1. # http://search.cpan.org/~bdfoy/Test-Prereq/lib/Build.pm
  2. # $Id: prerequisites.t 6328 2009-08-16 11:51:16Z jonasbn $
  3. use strict;
  4. use warnings;
  5. use Test::More;
  6. evaluse Test::Prereq::Build;
  7. my $msg;
  8. if ($@) {
  9. $msg = ‘Test::Prereq::Build required to test dependencies’;
  10. } elsif (not $ENV{TEST_AUTHOR}) {
  11. $msg = ‘Author test. Set $ENV{TEST_AUTHOR} to a true value to run.;
  12. }
  13. plan skip_all => $msg if $msg;
  14. prereq_ok();

Comment Form

About this blog

This blog acts as a channel for communicating logicLAB’s open source activities. Announcements on open source initiatives, involvements and releases of open source distributions of software products, projects and applications.

Photostream

  • jonasbn: Book wrote a more elaborate piece on CPAN deletions, which is worth mentioning: http://blogs.perl [...]
  • Neil Bowers: It would be good to hear your thoughts on supporting both an OO and procedural interface: what was t [...]
  • J: I'm experiencing the same issue as Petar. Anytime I click on any file, ‘No violations found’. N [...]
  • Petar: Nevermind that, I solved it with: perlcritic --brutal --verbose 5 lib t > perlcritic.txt || EX [...]
  • Petar: Hi Jonas, I tried adding perlcritic command as Windows batch command, but since my code has viola [...]

Calendar

August 2009
M T W T F S S
« Jul   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31