On Tue, Oct 27, 2009 at 03:31:46PM -0500, David Nicol wrote: > On Tue, Oct 27, 2009 at 11:58 AM, Ben Morrow <ben@morrow.me.uk> wrote: > > > The overload needs to return either a ref to a REGEXP (a qr//) or a bare > > REGEXP. Any further overloading on the return value will be ignored. > > Is it possible that in the future a coderef that takes the expression > as its $_[0] and gives the captures as its returned array might be > acceptable? Just asking what seems like the obvious question. The regexp engine is intertwined with at least half a dozen perl ops. It might be possible to write a pluggable regexp engine that accepts code references conforming to this sort of API, but a: I don't know how easy it is b: I changed the regexp API somewhat with the move to first class regexps, and left that job only part done, because I didn't update the pluggable API. Nicholas ClarkThread Previous | Thread Next