in reply to Re^3: Using an "outer" lexical in a sub?
in thread Using an "outer" lexical in a sub?
Seriously, in my eyes our is a language misfeature. My understanding is that it was introduced as a hook upon which further features can be hung. In Perl 6 those features will be hung upon it and it makes more sense. But in Perl 5 it is worse than what it replaced.
However it is great for surprising the maintainer. For instance:
package Foo; our $_ = "gotcha"; for (1, 2, 3) { print; print ": $_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Using an "outer" lexical in a sub?
by Joost (Canon) on Nov 01, 2006 at 23:49 UTC | |
by tilly (Archbishop) on Nov 02, 2006 at 00:09 UTC | |
by Joost (Canon) on Nov 02, 2006 at 01:26 UTC | |
by tilly (Archbishop) on Nov 02, 2006 at 03:06 UTC |