in reply to Hiding, but maintaining variables in user-defined code
Your example is a bit confusing to me. You call $test->helper() with the same $test as $test->execute. In that case is $self in helper not equal to $self in execute?
Or do you mean that you want to call:
$test->execute( sub { print "in the local coderef\n"; helper(); } );
with
sub helper { print "in helper\n"; }
and still have access to $self in helper?
Have Fun
|
---|
In Section
Seekers of Perl Wisdom