Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Naughty Regular Expressions and mod_perl

by Juerd (Abbot)
on Dec 21, 2003 at 16:39 UTC ( #316211=note: print w/replies, xml ) Need Help??

in reply to Naughty Regular Expressions and mod_perl

sub killperformance { eval q{ use re qw(debug); $&; }; }

The re pragma is not lexical :( This is a terrible performance killer, most of the time even worse than $&. And since the output goes to stderr, which is the error log under mod_perl, it can take a while to discover that it's still in effect globally.

Three very well known and widely used modules that use $& are Parse::RecDescent, Text::Balanced and XML::Twig.

Juerd # { site => '', plp_site => '', do_not_use => 'spamtrap' }

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://316211]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2022-08-10 02:07 GMT
Find Nodes?
    Voting Booth?

    No recent polls found