package Obj; sub new { my $class=shift; my $self={ x => 'uh' }; bless $self, $class; } sub howl { my ($self,$arg)=@_; print($self->{x}," $arg\n"); } package main; sub mname { 'howl' } my $x=Obj->new(); $x->howl('oh'); $x->can(mname)->('ah');