develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
Linda W
July 6, 2012 22:44
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:

 Father Chrysostomos via RT wrote:
> And, come to think of it, using ‘our’ in another package in the same
> scope is actually useful; so it shouldn’t warn.

Didn't know it did that... so it warns if you use it again in same package,
but NOT if you use it in another package...even though when you use  it 
in another
package it's potentially 'random' what package it is really referring to 
(did you declare
it first in main, or in that second package? third?)

That's desirable behavior. 

Personally, I'd like to see 'our' create a package scoped variable that 
wherever the package is. 

I **thought** that is what it was supposed to do.

How about
.18  (req. use packaged_our;)
.20 (on be default; to turn off use "no nopackaged_our";)
.22-24 (deprecate no packaged and see if what the feed back is...if 
necessary, leave it, else
~.26 -- kick it)..

> Using ‘our’ twice in the same package is harmless.  So I think the
> warning should simply go.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About