sub set_foo { my ($self, $val) = @_; $self->{ref($self)}{foo} = $val; }