- or download this
package Slave;
use Master;
- or download this
package Master;
use strict; use warnings;
...
no strict 'refs';
*{"$target\::nx"} = sub { do_something() }
}
- or download this
package Slave;
use strict; use warnings;
use Master;
sub do_something { my $pkg=caller(); print "$pkg\n"; }
- or download this
eval "package $caller; sub nx { do_something() }";