I have:
$rejected->{join ',', @needed}++ unless @filtered;
but the perlcritic complains with
title=Hash key with quotes - severity 5::[HashKeyQuotes] Avoid useless quotes
Obviously I can lower the severity, but I wonder whether there is any other way?
Two which I can think of are:
- use a constant
- move the whole
joinoutside the{}.
Is there any other approach?
I believe it's not within PBP to use quotes like that on
join. Try:I don't see any
perlcriticwarnings with this.In general though, I would block this on a code review, and ask for you to move the
jointo a new lexically scoped variable, with a decent name.