Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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.

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}

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?

    -Paul

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://596805]
help
Chatterbox?
[stevieb]: yeah, so the wiringPi library appears to be missing/injecting incorrect defined variables into I2C calls, and it's all over the map. I'm going to have to revisit and use something else, write something else, or scrutinize the code and fix

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2017-06-23 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (532 votes). Check out past polls.