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

Re: Problem with perlcritic when using Moose object

by tobyink (Canon)
on Oct 04, 2018 at 19:50 UTC ( [id://1223552]=note: print w/replies, xml ) Need Help??


in reply to Problem with perlcritic when using Moose object

This part:

shift( $hash->{shift} )

... confuses perlcritic into thinking you're doing:

shift($arrayref)

... and it wants you to do:

shift(%{$arrayref})

... instead. Performing array function directly on arrayrefs is an experimental feature which sucks and is stupid.

Replies are listed 'Best First'.
Re^2: Problem with perlcritic when using Moose object
by Anonymous Monk on Oct 05, 2018 at 22:34 UTC
    It's not an experimental feature; it's a removed feature. (https://perldoc.pl/perlexperiment#Array-and-hash-container-functions-accept-references) However, this case isn't actually trying to use the feature or the shift function, it's just mistaken identity.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2026-04-11 17:06 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.