package A ; sub new { my ($class, $type) = @_ ; "A:B$type"->new() ; } package A::B001 ; sub new { ... }