Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Naughty Regular Expressions and mod_perl

by Juerd (Abbot)
on Dec 21, 2003 at 16:39 UTC ( [id://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 => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found