in reply to Using closures to achieve data hiding in OO Perl
sub steal_ref { my $cleaneater = shift; my $gotself; local *{Dinnerclosure::washhands} = sub { $gotself = shift; }; $cleaneater->{'washhands'}->(); return $gotself; } my $gotself = steal_ref($cleaneater);
-r
|
---|
In Section
Meditations