Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday December 07, 2004
05:05 PM

Test::Cookbook

[ #22197 ]

We need a Test::Cookbook. From my recent post to the Perl QA List:

Problem:

POD is incomplete in a module but you still want to test POD coverage with something like Test::Pod::Coverage::all_pod_coverage_ok().

Solution:

Have a hash of modules to skip and use TPC's all_modules() function to ensure you don't miss new modules.

  use strict;
  use Test::More;
  eval "use Test::Pod::Coverage 0.08";
  plan $@
    ? (skip_all => "Test::Pod::Coverage needed to test POD coverage");
    : (tests => scalar @modules);

  my %TODO    = map { $_ => 1 } @modules_with_incomplete_pod;
  my @modules = Test::Pod::Coverage::all_modules();

  foreach my $module (@modules) {
    if (exists $TODO{$module}) {
      TODO: {
        local $TODO = "Known incomplete POD for $module";
        pod_coverage_ok($module);
      };
    }
    else {
      pod_coverage_ok($module);
    }
  }

Discussion.

Actually, I'd rather have a Test::Cookbook discussion. You can see the intent of the above code. It's not perfect (and I'm open to suggestions for improvement), but it's something that is not immediately obvious to someone who just started testing. Frankly, I don't care if Test::Cookbook was a wiki, a POD document or something else entirely (such as a book!), but something like this would be terribly useful.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.