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.