Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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

by shmem (Chancellor)
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.


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:

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 ( ) for more information.

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

plain silly


_($_=" "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}

Replies are listed 'Best First'.
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?


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://596805]
[choroba]: Good morning!
marto waves

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-05-24 09:15 GMT
Find Nodes?
    Voting Booth?