in reply to Re: Hiding, but maintaining variables in user-defined code
in thread Hiding, but maintaining variables in user-defined code

And what about allowing extra arguments for execute, simply by passing to the coderef whatever is left in @_?

# in the class package sub execute { my $self = shift; my $coderef = shift; return &$coderef($self, @_); } # in the main $test->execute(sub { my $self = shift; # do something with the rest of @_ }, $arg1, $arg2);
--bwana147