use Data::Dumper; my $obj_ref = bless {} , 'Any::Old::Perl::Identifier'; sub Any::Old::Perl::Identifier::make_hay{ my ($self) = @_; $self->{'foo'} = 'hay'; } $obj_ref->make_hay(); print ref $obj_ref, "\n"; print ref \$obj_ref, "\n"; print Dumper $obj_ref;