--- On Tue, 9/9/08, Aristotle Pagaltzis <[EMAIL PROTECTED]> wrote:

> I tried to use Google CodeSearch, but for some reason all
> my
> regexes that I feed it match all the cases I want to
> exclude.
> 
> I tried variations on
> 
>    
> use\s+Test::More.*no_plan\s*[')/]\s*[^;]
> 
> but that matches pretty much every `use Test::More` line
> with
> `no_plan` on it ever written, regardless of what follows.
> 
> If anyone can see something that I can’t, please tell me.
lang:perl no_plan\s*=>\s*\d+

This reminds me of all of the regexes people write to match "proper" HTML:  
sometimes something simple is all you need :)

  lang:perl no_plan\s*=>\s*\d+

Schwern had the 'no_plan => 1', but I was curious about plans other than one, 
so I also did this:

  lang:perl no_plan\s*=>\s*[02-9]

Quite a few people are embedding the actual plan with that.  I suspect that's 
so they can later come back and switch "no_plan" to "tests" with minimal 
editing.  (Or with 'Test::Most "die", no_plan => 7', you can die without having 
an extra failure from the plan, but I seriously doubt anyone cares about that :)

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to