use v5.10; package A { sub new { return bless {}, shift; } sub test { say __PACKAGE__ } } package B { sub new { return bless {}, shift; } sub test { say __PACKAGE__ } } my $a = A->new; $a->B::test(); $a->test;