The whole purpose of a module is to give you your own namespace, so you don't have to compete with the main program or other modules for subroutine names. So that's why you put "package MyModule;" at the top... to get your own namespace.
The Exporter stuff allows users of your module to selectively import your subs into their namespace, so they don't have to type "MyModule::addit" if they don't want to.
In reply to Re^2: To module or not?
by splinky
in thread To module or not?
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |