anonsub.t: Improve test for [perl #71154]
When I authored commit
2c3743704, I thought I was just correcting the
error message at the time (from ‘Not a CODE reference’ to ‘Undefined
sub called’, since there is a sub), but it turns out I actually fixed
another bug at the same time. Undefined anonymous subs were falling
back to supposedly-autoloaded __ANON__ subs.
Take this example, for instance:
sub __ANON__ { warn 42 }
$x = sub {};
undef &$x;
$x->();
This is the output I get:
$ pbpaste|perl5.14.0
42 at - line 1.
$ pbpaste|perl5.16.0
Undefined subroutine called at - line 4.