Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 ( [id://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 (Bishop) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119147]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found