all will be well if every program does use Foo; that is never, ever preceded by use Foo::Bar;
I disagree with the two underlined wordings. It's possible that the two definitions of package Foo::Bar don't conflict, and that the overlap may even be intentional, for example if package Foo needs to monkey-patch something into Foo::Bar. Granted, these cases may be rare, and the point that the packages might conflict is very valid, but the above wordings are just too absolute for my taste.
| [reply] [d/l] [select] |
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: <%-{-{-{-<
| [reply] [d/l] [select] |