Closed jimav closed 2 weeks ago
https://perldoc.perl.org/perlsub
&NAME; # Makes current @_ visible to called subroutine.
...
If a subroutine is called using the
&
form, the argument list is optional, and if omitted, no@_
array is set up for the subroutine: the@_
array at the time of the call is visible to subroutine instead.
...
&foo; # foo() get current args, like foo(@_) !!
Ah, of course. Changing the line to my $max = &{"${tname}_MAX"}();
resolves the problem.
With
use feature 'signatures';
, if a signatured sub body calls a non-signatured sub using a symbolic reference with&{"..."}
, the "Implicit use of @_ in subroutine entry with signatured subroutine is experimental" warning is triggered.This seems inappropriate because no reference to
$_[x]
or@_
is involved. The warning happens even if no parameters are referenced in any way.Steps to Reproduce
Result
Expected behavior
The warning doesn't seem correct.
Perl configuration perl 5.38.2 perl_dashV.txt