On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
How do I write a multiple file perl program? I dont want to conflict with any real module names that were built in or are on CPAN. I just want to spread some subs onto some other files.
The easiest way to avoid namespace conflict is to include your or your companies name in the package name. Let's say you work for Example, Inc and it owns the domain example.com, you need to split the program into three modules (one to handle getting data, one to handle working with data, and one to handle writing data), and the project is named FooBar. You could take the Java route and say Com::Example::FooBar::Read Com::Example::FooBar::Munge Com::Example::FooBar::Write Of course, that is the extreme, most people would just bet that their project name is not likely to conflict with a top level name in CPAN and would name them FooBar::Read FooBar::Munge FooBar::Write And finally the best way to ensure you don't conflict with CPAN is to upload your modules to it (assuming you have made them generic enough to be useful to other people). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/