develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [PATCH] t/op/pat.t using

Thread Previous | Thread Next
David Landgren
April 27, 2006 10:26
Re: [PATCH] t/op/pat.t using
Message ID:
Jim Cromie wrote:

> You might consider your own Ok(), starting with Yves' or Ron's snippets,
> which wraps 2 checks into 1 call.

But the line numbers will point to the custom ok(), rather than the line 
in pat.t

> <aside>  does like() reset $1 etal ? </>

Irrelevant here. I went so far as replace

   $@ ~= /^\QQuantifier in {,} bigger than 32766 in regex/


   my $fail_msg = 'Quantifier in {,} bigger than 32766 in regex';
   cmp_ok(substr($@,0,length($fail_msg)), 'eq', $fail_msg);

... so that regexps aren't used to determine the result of a regexp 
test. And as $1, $2 scopes are bound to curlies that's enough to work with.

"It's overkill of course, but you can never have too much overkill."

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About