in reply to
Re: Understanding module structure and inheritance
in thread Understanding module structure and inheritance
Contact inherits Main. That means the Contact namespace will also include a copy of all the symbols of the Main namespace plus whatever it defines for itself.
That's actually not how inheritance works in Perl. The parent class's symbols do not get exported to the child class. When a method is called on the child class with the arrow (->) syntax, if that subroutine is not defined in the child class, then Perl searches the parent class(es) for it, and then finally tries AUTOLOAD if that doesn't work.
Update: Fixed typo