in reply to "use" inheritance

No, because 'use' (which calls 'import' in the module being 'used'), only imports the exported subs into the current namepsace, thus, main gets them, and Foo does not.

C.