in reply to perl beginner question
When the .pm file will not be in the same directory as the main script, I'm fond of using the lib pragma.
When the .pm file will be in the same directory as the main script, it is sometimes easier to skip the package declaration in the module. This will place everything from the module in the "main" package namespace. This is not a good idea for code that will be used in a variety of projects, but may be useful when intended for a group of related scripts that share code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl beginner question
by ikegami (Patriarch) on Jun 02, 2009 at 14:56 UTC |