mldvx4 has asked for the wisdom of the Perl Monks concerning the following question:
What is the correct way to pass a hash to a subroutine separately from a few strings? I have been using the following method,
sub generate { my $record = shift; my $status = shift; my %data = %{$_[0]}; ...
However, that brings up an "Always unpack @_ first" error with perlcritic --stern and therefore I wonder if there is a more appropriate method.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a hash plus some strings to a subroutine
by Fletch (Bishop) on Dec 17, 2025 at 15:02 UTC | |
|
Re: Passing a hash plus some strings to a subroutine
by hippo (Archbishop) on Dec 17, 2025 at 15:25 UTC | |
by ikegami (Patriarch) on Dec 17, 2025 at 15:35 UTC | |
by LanX (Saint) on Dec 17, 2025 at 15:55 UTC | |
|
Re: Passing a hash plus some strings to a subroutine
by LanX (Saint) on Dec 17, 2025 at 16:11 UTC |