Doesn't lexically scoped imply this? It's quite explicit in perldoc -f
that our has the same scoping as my and the name "our" implies to me
that the variable belongs to all the things in the file (or other
scope), regardless of which package they're in.

Some things are lexically scoped (block/file/eval), some are package
scoped. Is there another type of scoping? I can't think of any (but I
haven't tried very hard). If you're going to change the behaviour
(implied by deprecation) then you'd be creating a new type of scoping
exclusively for our(),

F


On 7/13/05, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 13, 2005 at 05:42:17PM -0400, Rick Delaney wrote:
> > where it would just be a nuisance.  And as you point out, the
> > cross-package scope can be a bit surprising.  If anything I think the
> > use of an our() variable outside its package is more deserving of a warning.
> 
> I'd tend to agree.  That behavior seems like a misfeature and just asking
> for a gotcha in multi-package files.  I'd argue it should be deprecated.
> 
> Does anyone remember why it was decided our() should act this way?
> 
> 
> --
> Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
> You are wicked and wrong to have broken inside and peeked at the
> implementation and then relied upon it.
>         -- tchrist in <[EMAIL PROTECTED]>
>

Reply via email to