On Fri, 2005-08-19 at 10:24 -0700, Eric Wilhelm wrote:
> # 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

Nothing's ever 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.

PPI seems like a rather heavyweight tool for the job.  Since the idea is
to test the POD for boilerplate, you don't have to scan the rest of the
code.  Something really simple should suffice, and not fail its own
tests either.

while(<>) {
    next unless /^=/../^=cut/;
    /A. U. Thor/ && error("Left default author in POD");
    /.../ && error(...);
}
-- 
Bruce J Keeler <[EMAIL PROTECTED]>

Reply via email to