in reply to Giving subroutines access to themselves
Imagine an Account class (an abstract base). Create two subclasses: ActiveAccount and DisabledAccount. You can now create
The reblessed object will no longer have access to the methods in ActiveAccount. --DaveActiveAccount::disable { my ($self) = @_; bless $self, "DisabledAccount"; }
|
|---|