3 use Test::More 'no_plan';
6 my ($usepack, $name, $inpack, $sub) = @_;
8 *{"${inpack}::${name}"} = $sub;
12 my ($usepack, $use, $inpack, $name) = @_;
13 return sub (&) { ($usepack, $name, $inpack, $_[0]); };
16 use Devel::Declare 'method' => \&handle_method;
18 eval "method bar { 42 }";
21 is( __PACKAGE__->bar, 42 );