I suspect you want something like this for the implementation of alertness:
sub alertness { my $self = shift; if( @_ ) { $self->{STATE} = shift; } return $self->{STATE}; }
In reply to Re: Implementing State pattern
by rhesa
in thread Implementing State pattern
by Justin_BSI
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |