There's a great deal of complaining in the English module that you can't
use it unless you can live with a really bad performance hit in all your
regexps. How about an "English::Good" module? This would basically be the
same thing as the English module, but it wouldn't include the names MATCH,
PREMATCH, and POSTMATCH. English could then import (and re-export) everything
from English::Good as its own if you absolutely, positively had to have
all the above.
Another approach: if you need MATCH, PREMATCH, and POSTMASTCH,
perhaps you could invoke a module English::Bad that would have all these
bad boys in them, and would hammer performance on those unluckies who need
them. In this latter scenario, you would import English, and import English::Bad
if you used those other variables.
The advantage of the first scheme is it would break no existing scripts;
but then, few people would also receive the benefits unless they RTFM'd.
The advantage of the latter is (I feel, anyway) that most folks don't really
use these variables, so breaking them would help more people immediately.
That is, it's an engineering choice in favor of helping more people with
performance improvements.
Would this work, or am I inhaling something? :-)
--
http://www.pricegrabber.com | The best deals, all the time.
Migrated from rt.perl.org#1977 (status was 'resolved')
Searchable as RT1977$
The text was updated successfully, but these errors were encountered: