Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl::Critic says don't modify $_ in list functions and other things

by Anonymous Monk
on Jul 10, 2020 at 14:58 UTC ( #11119147=note: print w/replies, xml ) Need Help??


in reply to Perl::Critic says don't modify $_ in list functions and other things

I actually started using Perl::Critic lo these many moons ago when the current Perl was 5.8, because of my $var = "foo" if 'some condition'. My experience was that usually it behaved the way you would expect ($var was undefined if the condition was false). But sometimes it retained whatever the previously-assigned value was.

In general, my feeling about Perl::Critic is that if it flags something, it means someone, somewhere, under some circumstances had trouble with that construct. Maybe those circumstances do not apply to you, and you should not feel guilty about disabling a policy, but you should think first, both about what the policy does in general and whether it applies in your case.

Replies are listed 'Best First'.
Re^2: Perl::Critic says don't modify $_ in list functions and other things
by hippo (Chancellor) on Jul 10, 2020 at 16:17 UTC
    if it flags something, it means someone, somewhere, under some circumstances had trouble with that construct

    TheDamian in the cellar with the lead piping.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-09-30 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (158 votes). Check out past polls.

    Notices?