From: Austin S. <te...@of...> - 2002-08-04 21:14:11
|
On Sun, Aug 04, 2002 at 12:00:25PM +0200, Roland Giersig wrote: > Quoting "Blackstone, J. David" <jda...@ci...>: > > > Another thing I meant to say about regexes is I think it would be > > really cool if we could drop -re altogether. To my mind it seems like the > > method should use ref to see if you've passed a qr// regex or a plain > > scalar. Of course, my mind doesn't work like anyone else's, and it > would break > > backward compatibility. > > Right, and that's why it's not gonna happen. Please note that with the > new syntax with callbacks it's already the default: > > $exp->expect($timeout, > [ "regexp", \&callback ], > [ qr/regexp/, \&callback ],); > Btw, just noticed this. Did you mean: $exp->expect($timeout, [ "regexp", \&callback ], ^^^^^^^^ "substring"? If we allow for a Regex to be passed, DWIM would seem to indicate that a non-Regex would be a substring. Gee, come to think of it, if we allow for Regex objects to be passed, we probably don't need the ugly tomfoolery for multiline matching, etc. Austin |