NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
A package not in a module... (Score:1)
1) Differentiation of namespaces within a program?
2) Private class/object definition/functions w/ no chance of re-use by other code?
3) Other motives?
Jon
Reply to This
Re:A package not in a module... (Score:1)
There are many other reasons, too. I don't have time now, perhaps others can mention some.
Warning: Crack use is up (Score:1)
As much of a style Nazi as I am about Perl, having multiple packages in a file is perfectly legimate if the packages are related. Many DBD modules do this. SOAP::Lite does this. When dealing with XML::Parser, you often need to define your own package for callbacks. It's convenient and often sensible. Packages are simply namespaces. They cost nothing to use. Would you rather have one big bookcase or several smaller ones? Depends on your dwelling.