[prev] [thread] [next] [lurker] [Date index for 2003/05/31]
On Fri, May 30, 2003 at 12:08:20AM +0100, Richard Clamp wrote: > On Thu, May 29, 2003 at 11:30:05PM +0100, Nicholas Clark wrote: > > Given that > (in Email::Find) > > > > sub addr_regex { $Addr_spec_re } > > > > returns a constant, and the winner on time bloat is: > > > > sub find { > > my($self, $r_text) = @_; > > > > my $emails_found = 0; > > my $re = $self->addr_regex; > > $$r_text =~ s{($re)}{ > > my($replace, $found) = $self->validate($1); > > $emails_found += $found; > > $replace; > > }eg; > > return $emails_found; > > } > > > > would turning that s///eg into s///ego be a good idea? > > Looks likely. > > > [it doesn't let you subclass with a dynamic return result for addr_regex] > > Ah, but such a change is unwanted upstream then we can subclass it, > and just replace C<find> with one that does, and s'all good. It doesn't seem to help :-( [even when I work out how to replace find_emails to call the constructor for my subclass, rather than Email::Find. It goes more slowly. Bah. "more slowly" doesn't quite make sense (18 seconds from 15 IIRC). "just the same" would. ] NickThere's stuff above here
Generated at 13:56 on 01 Jul 2004 by mariachi 0.52