in reply to Anonymous Autoloading with OOP?

I think you're asking how to overload stringification.
use strict; use warnings; BEGIN { package MyPackage; use overload '""' => \&to_string; sub new { my $this = shift; my $class = ref($this) || $this; return bless {}, $class; } sub to_string { my ($self) = @_; return "ook?"; } } my $object = MyPackage->new(); print($object, "\n"); # ook?