in reply to Re: Multiple Packages in a Module?
in thread Multiple Packages in a Module?
If foo.pm defines both package Foo and Package Foo::Bar, all will be well if every program does use Foo; that is never, ever preceded by use Foo::Bar; ...
In the above case, a use Foo::Bar; statement can never access a file foo.pm (In Windose (sigh)) or Foo.pm (in other, saner file systems).
... and if there is not by pure-accident a Foo/Bar.pm file anywhere in your filesystem. If there's a conflict in your package resolution ...
If there's ambiguity or conflict in file name resolution ordering, then any use or require statement can latch onto the wrong .pm file; it has nothing to do with defining multiple package namespaces within a single .pm file.
... it can be a true headache to debug.
True that, brother!
Give a man a fish: <%-{-{-{-<
|
---|