redtux has asked for the wisdom of the Perl Monks concerning the following question:
Running through perlcritic I get the following warning, refering to the sub-routine containing the below code
Always unpack @_ first.
This refers to the line where the parent sub-outine is defined (in this case 7408 and the following is at line 7655)
However it is is triggered by the mce_loop routine. Weirdly if I dont unpack @_ the warning doesn't occur.
Any ideas?
use MCE::Loop; MCE::Loop->init( chunk_size => 1, max_workers => 10, use_threads => 0 ); my %result; MCE::Util::get_ncpu %result = mce_loop { my ($mce,$chunk_ref,$chunk_id) = @_; my %ret; for my $item (@{ $chunk_ref }) { my $ret=tags_get($item); $ret{$item->[1]}=$ret->{$item->[1]}; #say $ret{$_->[1]}; } $mce->gather(%ret); } $fileprobe; MCE::Loop->finish;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlcritic and MCE::Loop
by hippo (Archbishop) on Feb 18, 2021 at 13:33 UTC | |
|
Re: perlcritic and MCE::Loop
by LanX (Saint) on Feb 18, 2021 at 13:34 UTC | |
by redtux (Sexton) on Feb 19, 2021 at 19:07 UTC | |
by LanX (Saint) on Feb 19, 2021 at 21:40 UTC | |
by redtux (Sexton) on Feb 20, 2021 at 14:52 UTC | |
by LanX (Saint) on Feb 20, 2021 at 21:02 UTC | |
by LanX (Saint) on Feb 20, 2021 at 15:56 UTC | |
by LanX (Saint) on Feb 19, 2021 at 19:27 UTC |