[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] where to put subroutines



On Wed, 14 Apr 1999, Vicki Brown wrote:

> At 16:02 -0700 4/14/99, Peter Prymmer wrote:
> >> >...
> >> > it. Thus it doesn't matter where in the file you put the subs (but not
> >> > before '__END__').
> >>
> >> Don't you mean "Not after __END__"?  The area after __END__ is data
> >>space.
> >
> > Neither of you use Autosplit/AutoLoad much do you?
> 
> Nope ;-)
> So enlighten me.... what made that obvious?
> ---
In module files stuff after __END__ is meant for subroutines to be
autosplit. __DATA__ is used in module files in the same way that __END__
is used in scripts.

So, actually, DATA filehandles are per-package.

Incidentally, with reference to an earlier post, I agree that modules have
somewhat more internal structure to keep track of (but not much more) than
library files, but consistent use of 'h2xs' makes module creation very
simple indeed. So I think that no strong argument can be made for not
using modules.



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org