in reply to Re: Package-Level Variables
in thread Package-Level Variables
Ugh... do you actually use that? I thought that was only an unintended side-effect of how scratchpads are implemented. Am I confused on that point?
I would use a named closure for emulating static vars
{ my $static; sub count { $static++ } }
Also, I think "use Foo;" is more analogous to "#include <Foo.h>" than "package Foo;" is.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Package-Level Variables
by halley (Prior) on Jul 25, 2003 at 23:36 UTC | |
by sauoq (Abbot) on Jul 26, 2003 at 00:32 UTC | |
by tachyon (Chancellor) on Jul 26, 2003 at 07:01 UTC |