Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Problem with perlcritic when using Moose object

by pryrt (Abbot)
on Oct 04, 2018 at 15:48 UTC ( [id://1223537]=note: print w/replies, xml ) Need Help??


in reply to Problem with perlcritic when using Moose object

Based on the perlcritic message autoderef is deprecated [...]  Use of each/keys/pop/push/shift/splice/unshift/values on a reference is an experimental feature..., it seems to think your key called 'shift' is the shift() builtin. Does the same thing happen if you renamed 'shift' to 'working_shift' in the example code (sorry, I don't have perlcritic, otherwise I'd try before posting). Alternately, what if you used $hash->{'shift'}, to make sure it disambiguates for perl and perlcritic

... Actually, thinking about it, it might also be the method named 'shift' which is triggering perlcritic to complain about it, even though perl knows you're referencing the method, not the builtin. Either way, (temporarily) renaming the 'shift' attribute should tell you whether that's the problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2026-04-21 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.