> > How many "things" can packages be?  Is this foo a file?
>
> No this "foo" doesn't have to be a file. You can "have" several
> packages in one file and "switch" between them.
>
> I don't know how to explain what ARE packages though.
> Try if
>       perldoc perlmod
> makes sense to you.

After reading perldoc perlmod, my conclusion...

'package foo' is useful if one wants to:

1. Plug in someone else's code without any renaming (avoid vars with same name
where one side is too lazy to use strict).
2. Write obscure code ('use', 'require', and '&coolsub' would be too easy for
the reader to understand).
3. Write a debugger.
4. Increase hair-pulling on the planet. ;->

Aside from the function name, the term "package" has its more generic meaning,
often used in talking about modules (.pm files). (?)

I was thinking there might be an instance where 'package bar' is essential, or
the best way to go.

/g



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to