##
package M;
sub x {
print "sub __PACKAGE__x";
}
sub y {
print "sub __PACKAGE__y";
}
1;
package N;
$s = 'M::y';
*M::x = eval "&$s";
M::x();
####
~/hacks/config-dbi/scripts $ perl symref.pl
Undefined subroutine &main::1 called at symref.pl line 19.
sub __PACKAGE__y ~/hacks/config-dbi/scripts $