On 7/14/05, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 14, 2005 at 12:37:59AM +0100, Fergal Daly wrote:
> > That's definitely a nasty gotcha at the end there but what's the
> > diference between the our() you're suggesting and use vars (apart from
> > the ability to assign a value)?
>
> Aside from the syntax sugar, its still lexical.
>
> use strict;
> package Foo;
> {
> our $bar;
> $bar = 42;
>
> package Bar;
> print $bar; # Not death now, but would be under the
> # proposal.
> }
> print $bar; # Death!
>
> package Bar;
> print $bar; # more death!
It would be block and eval scoped which is slightly different. So if
it happens, we shouldn't call it lexically scoped. It's just the
confusion of adding third scope (and possible backwards compat issues)
that bother me.
I don't really use our() so I wouldn't miss it if it disappeared completely,
F