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

Re: Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
July 7, 2012 00:13
Re: Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
On Friday, July 06, 2012 10:43:40 PM Linda W wrote:

> 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?)

It's perfectly predictable, just like all other lexical declarations.
> Personally, I'd like to see 'our' create a package scoped variable that
> exists wherever the package is.

That's effectively what does.

> 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)..

My feedback is "please don't break working code when a perfectly good 
mechanism already exists to do what you want". This would invent a new kind of 
declaration completely unlike any other declaration in Perl 5 and remove a 
useful existing declaration.

-- c

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