Getters A method is just a subroutine that knows its first argument is going to be an object reference. In Perl, the convention is to call that object reference $self: sub get_foo { my ($self) = @_; return $self->{foo}; } Caller says: print $object->get_foo(); # Prints "my foo".