in reply to Inheritance strangeness

B is also a core module and will be loaded instead of your B.pm module.

rename B.pm to BB.pm and change the package name and "use base" statement in C.pm and this will work:

#!/usr/bin/perl use C; C->foo();