in reply to Re^6: Perl Style: Is initializing variables considered taboo?
in thread Perl Style: Is initializing variables considered taboo?
Talking about our, state, local I disagree.
Then you are wrong!
The term "scope" can be characterized as dynamic OR static, it has compilation and runtime aspects.
True. But that has no affect on how those keywords affect scope.
our only affects dynamically scoped variables. Their scope remains global, our just makes them visible within the current lexical context.
It allows a lexical variable to retain its value beyond its lexical lifetime. It extends rather than restricts it.
If you localise a (dynamic) var, but then call some sub or method that uses it without localising it, you get screwed over.
But since we both exactly know how they work
Hm. Do you? It doesn't seem that way.
I'll quit this discussion
Good idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Perl Style: Is initializing variables considered taboo?
by LanX (Saint) on Aug 21, 2010 at 17:48 UTC |