in reply to To be, or not to be, a package? That is the question
The problem is that package doesn't in and of itself introduce a new lexical scope so the previous $value (declared in the outer file-wide scope) is still valid. If you're trying to keep things grouped in the same file then wrap each package's contents in curlies so that there's a separate explicit lexical scope (or just put things in multiple files to begin with . . . :).
Update: Added parenthetical on file scope.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To be, or not to be, a package? That is the question
by Bloodnok (Vicar) on Dec 04, 2008 at 14:04 UTC | |
by Fletch (Bishop) on Dec 04, 2008 at 14:16 UTC | |
by almut (Canon) on Dec 04, 2008 at 14:39 UTC | |
by Bloodnok (Vicar) on Dec 04, 2008 at 14:47 UTC |