Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think that the confusion here is that inclusion of a file is generally tied closely to the specification of a separate package namespace. This is a good idea (to avoid collisions between variable and subroutine names), but isn't really required. Consider program foo.pl:
If modules Inc1.pm is specified as:
and Inc2.pm is:
You get the expected results -- that subroutines foo1 and foo2 are called from their corresponding modules. Unlike (for example) Pascal, the Perl programmer is not burdened with the arbitrary preferences of the person who specified the language. TMTOWTDI. This is not merely a slogan, it's a language reality, and you have hereby been provided with more than enough rope to hang yourself. Use it in good health. In reply to Re: Multiple Files, One Script Possible?
by papidave
|
|