Module::CPANTS::Analyse stricter than Test::Pod

brian_d_foy on 2007-03-19T06:42:39

CPANTS tests module kwalitee, including a metric for Pod tests. It does much more than Test::Pod I discovered.

While fixing PodToHTML, I discovered that even though Test::Pod did not complain, cpants_lint.pl did. It took me a while to figure it out, but Test::Pod only looks for specific files (modules and scripts), while the Pod checker in Module::CPANTS::Analyse looks for any files with the right extensions (.pm, .pl, .pod). It doesn't care what they are or where they come from.

PodToHTML has a t/testpod.pod. Test::Pod ignores it, but Module::CPANTS::Analyse looks at it. Since it's a test file, it has some broken Pod in it on purpose. Since it has broken Pod, cpants_lint.pl complains.

This is a bit of a problem for authors writing Pod modules and testing bad input. :(


odd...

jjore on 2007-03-19T06:51:20

I would have thought the kwalitee and CPANTS movement was harmful anyway. I've since removed all my author-level tests from my distributions because really... they suffer from the Module::Install problem where every distribution has its own version of an adhoc series of author sanity tests.

I used to check for pod sanity and coverage and such but after a dozen modules or so it wasn't sane to leave that stuff in my distributions. Really, I just want a Distribution::AuthorTests or something like that which has M::I's auto-upgrading feature. Anything less is almost a misfeature.

Way out

Aristotle on 2007-03-20T04:43:51

If you really care about the CPANTs game, you could use some trivial encoding for the file with the bad POD and then generate the file used to test at test time as a temporary file. Maybe as little as renaming the file would suffice to hide it.