At some point in the 5.21.x branch, B::Deparse has started to deparse sub
references as fully qualified names under "use strict 'vars'". We just
turn this stricture off while compiling the test cases for the time being.
-sub dummy { }
-sub add { $_[0] + $_[1] }
-sub call ($$$) { my $x = \&dummy; $_[0]->($_[1], $_[2]) }
-sub foo { call(\&add, $_[0], 1); }
-sub bar { my $y = \&call; $y->(\&add, $_[0], 1); }
+{
+ BEGIN {
+ strict->unimport('vars') if "$]" >= 5.021;
+ }
+ sub dummy { }
+ sub add { $_[0] + $_[1] }
+ sub call ($$$) { my $x = \&dummy; $_[0]->($_[1], $_[2]) }
+ sub foo { call(\&add, $_[0], 1); }
+ sub bar { my $y = \&call; $y->(\&add, $_[0], 1); }
+}
sub which {
my ($brd, $coderef, $yfunc, $yref, $nfunc, $nref, $l) = @_;
sub which {
my ($brd, $coderef, $yfunc, $yref, $nfunc, $nref, $l) = @_;