package A; sub new { my $class=shift; my $self={}; bless $self, $class; return $self; } sub doit { print "doit in A\n"; } package B; @ISA=qw(A); sub AUTOLOAD { print "autoload in B, called as $AUTOLOAD\n"; } package main; $a=B->new; $a->doit;