http://www.perlmonks.org?node_id=932612


in reply to Re: Perl Modules with 2 or more classes
in thread Perl Modules with 2 or more classes

Moose and/or other object systems have nothing to do with it. The relation between packages (classes) and files is purely a convention born of convenience. There's absolutely nothing stopping you from putting multiple packages into a single file or splitting a single package across multiple files while using only the core language. It messes with use (which assumes that the file name and package name will be identical) and can thoroughly confuse anyone trying to read/maintain the code in the future, but that's about it.

Replies are listed 'Best First'.
Re^3: Perl Modules with 2 or more classes
by anneli (Pilgrim) on Oct 20, 2011 at 21:09 UTC

    Good points. Thank you!