in reply to Multiple packages in one module file
Package names aren't required to have anything to do with file names -- and when you use or require a file, all Perl cares about is translating the name you give into a file path, finding the file, and compiling it. (If it can't find an import() in the associated package, it doesn't really care.)
It's good form to keep package names in sync with their file names. If you need to have separate packages in the same file, they ought to be helper packages. In this case, you're stuck using a. If you run into this often, break out b into its own file.
|
|---|