sub foo { my ($self, $data) = @_; $self->{bar} = $self->method($data); }