Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Module Announcement: Perl-Critic-1.01

by shmem (Canon)
on Jan 27, 2007 at 00:43 UTC ( #596805=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Module Announcement: Perl-Critic-1.01
in thread Module Announcement: Perl-Critic-1.01

update: I overlooked the -no_match_vars (ETOOMUCHNOISE? :-), the impact of use English isn't that nefarious in the advised usage. But even so, I stand to my statement.

jthalhammer,

The magic punctuatinon it is talking about is $@ without which I could not really catch exceptions
use English qw(-no_match_vars); eval { die 'A horrible death' }; print "Something died\n" if $EVAL_ERROR;

Please go read perlvar. I include the relevant bits here:

BUGS
Due to an unfortunate accident of Perl's implementation, "use English" imposes a considerable performance penalty on all regular expression matches in a program, regardless of whether they occur in the scope of "use English". For that reason, saying "use English" in libraries is strongly discouraged. See the Devel::SawAmpersand module documentation from CPAN ( http://www.cpan.org/modules/by-module/Devel/ ) for more information.

Suggesting use English to avoid the use of $@ is just

plain silly

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}


Comment on Re^3: Module Announcement: Perl-Critic-1.01
Select or Download Code
Re^4: Module Announcement: Perl-Critic-1.01
by jettero (Monsignor) on Jan 27, 2007 at 03:35 UTC

    I dislike English, but it does say: use English qw( -no_match_vars ) ; # Avoids regex performance penalty. Nobody fixed the perlvar page maybe?

    -Paul

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-07-06 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls