package A; sub new { my $c = shift; $c = ref $c || $c; bless {}, $c; } package B; @ISA=qw(A); sub new { my $c = shift; $c = ref $c || $c; bless {}, $c; } package main; my $b = new B; print "b isa A = ", $b->isa('A'), "\n"; print "ref b = ", ref($b), "\n";