Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you use a module, Perl deals with it at compile time. If you require a module, Perl deals with it at run time. I typically like to use a module because it allows me to check everything via a perl -c someprog.pl after I've finished coding. It I used require instead, I wouldn't find out that something was wrong until I ran the program for the first time. YMMV, just my own personal preference. require is handy though if your program needs to do something based on whether you have a module installed on your system. You can test for this at runtime.
--
vek
--
In reply to Re^3: Program structure: subs vs modules vs Selfloader
by vek
|
|