# from Robert Rothenberg
# on Thursday 18 August 2005 07:51 pm:

>h2xs
<snip>
> stupid mistakes.
<snip>
>match regexps of known defaults.

1.  Don't call it Test::Stupid - How about Test::Finished

2.  Don't use regexs directly (wouldn't this module be likely to fail 
it's own tests if you did that?)  Use PPI or at least one of the Pod:: 
parsing modules.

>Maybe also check that the ChangeLog 
>has a version which matches the VERSION in the POD

This sort of thing is useful, but not as useful as a helper that 
facilitates building/maintaining a Changelog (see Andy's comments.)  I 
would rather have my changelog and all of the other documentation in 
Pod in the .pm file and then autogenerate Changes, README, HACKING, and 
Mod::Foo.pod from there (maybe something involving Pod::Readme if I 
ever get around to it.)

Of course, if you're autogenerating these things, a test for whether 
they are correct would be extremely useful.  Maybe writing Test::Info 
and adding it to the Module::Starter distribution or something...  
Maybe Module::Manager...

<snip>
>There will be a simple script for authors to run so that it checks for
>these things.
<snip>
> uploading a distribution.
>
>Perhaps a Module::Build utility could run this script before building
> a distribution and giving a warning.

If people are still using h2xs to rough-out a module (whether due to 
habit or that old bit of "always start with h2xs\n"x3 from the 
ExtUtils::MakeMaker docs), then they aren't going to have these tests 
in their distribution.

If you want to identify modules on CPAN which have boilerplate pod, 
adding a test module isn't the way to do that.  For that, you'll need a 
program (or extension to search.cpan.org) which identifies and flags 
them - or maybe autogenerates patches and uploads them to rt.cpan.org.

--Eric
-- 
[...proprietary software is better than gpl because...] "There is value
in having somebody you can write checks to, and they fix bugs."
--Mike McNamara (president of a commercial software company)
---------------------------------------------
    http://scratchcomputing.com
---------------------------------------------

Reply via email to