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"; }
In reply to Re: Giving subroutines access to themselves
by dpuu
in thread Giving subroutines access to themselves
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |