I'm guessing you don't want to the mode to be changed except by methods of the class. If so, make a "private" writer.
has mode => ( reader => 'mode', writer => '_set_mode', isa => 'Str', required => 1, ); sub creaLog { my $self = shift; $self->_set_mode('changed'); }
In reply to Re: Moose: problem with accessor
by ikegami
in thread Moose: problem with accessor
by saintex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |