in reply to Passing a hash plus some strings to a subroutine

It depends on ...

update

but yeah, the real problem here is perlcritic enforcing old PBP rules here.

Not sure how it handles newer mechanisms.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

  • Comment on Re: Passing a hash plus some strings to a subroutine

Replies are listed 'Best First'.
Re^2: Passing a hash plus some strings to a subroutine
by mldvx4 (Hermit) on Dec 20, 2025 at 11:00 UTC
    but yeah, the real problem here is perlcritic enforcing old PBP rules here.

    Is there another tool which would be more appropriate to run?

      Sorry, I'm the wrong one to ask about Perl::Critic - I don't use it.

      I know that many companies expand/restrict the rule sets to their liking in order to have coherent internal style.

      And PBP itself described its rules only as suggestions, IIRC.

      Anyway, what Fletch showed you is the standard vanilla approach which will always work.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      perlcritic is fully configurable. If you disagree with a policy, you can turn it off.

      See also Perl::Critic::Community for a revised and modernised set of perlcritic rules, created mostly by the IRC subset of the Perl community.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]