#!/usr/bin/env perl use strict; use warnings; # Note the order ... "A::B", "A" - this works! use A::B; use A; A::sub_a(); A::B::sub_b(); exit;