sub AUTOLOAD { my ($self, $newval) = @_; $AUTOLOAD =~ /.*::get(_\w+)/ and $self->_accessible($1) and return $self->{$1}; $AUTOLOAD =~ /.*::_set(_\w+)/ and $self->_accessible($1) and do { $self->{$1} = $newval; return; }; # error croak "No such method: $AUTOLOAD"; }