use Package::Relative; my $object = (PKG . "Class")->new; # your example my $object = (PKG . "..::Class")->new; # more interesting