On Tue, 14 May 2019 23:09:38 -0700, tonyc wrote: > On Tue, 30 Apr 2019 16:50:20 -0700, jim.avera@gmail.com wrote: > > Not sure whether this is intended behavior, but just in case it's > > not... > > > > The refalias > > \&foo = \&bar > > is documented as "foo() now means bar()", but it doesn't entirely: > > > > In subsequently-compiled code, the compiler still wants calls > > to foo() to match the old foo's prototype, not the prototype of bar. > > > > > > #!/usr/bin/perl > > use strict; use warnings; use v5.22.0; > > > > use feature 'refaliasing'; > > no warnings 'experimental::refaliasing'; > > > > sub foo($$$$) { } > > sub bar($) { } > > > > BEGIN{ \&foo = \&bar; } > > > > foo(1); # Gets "Not enough arguments for main::foo" > > Fix attached. Applied as 40258daf9899686d934c460ba3630431312d7694. Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=134072