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

[perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 6, 2012 13:44
Subject:
[perl #113974] package NAMESPACE manpage comments
Message ID:
rt-3.6.HEAD-28836-1341607436-542.113974-14-0@perl.org
On Fri Jul 06 13:09:49 2012, ikegami@adaelis.com wrote:
> On Fri, Jul 6, 2012 at 4:06 PM, Eric Brine <ikegami@adaelis.com> wrote:
> 
> > That means I'd like to see:

That’s a pity.  I know it will break code.  And the alternative, \my $x
= \our $x, doesn’t work.

I would have to write, at the top of a file:

for my $code (our $code) {
for my $this (our $this) {
for my $scope(our $scope) {
for my $parser(our $parser) {
....

and put this at the bottom:

}}}}

Actually, the piece of code I’m looking at would require eleven such
topicalizers.

> > package AAA;
> > # $foo is a strict error here.
> > {
> >    our $foo
> >    # $foo means $AAA::foo here
> > }
> > # $foo is a strict error here.
> > our $foo
> > # $foo means $AAA::foo here
> > package BBB;
> > # $foo is a strict error here.
> >
> (This is the difference from current behaviour. This doesn't re-enable the
> behaviour Larry Wall called buggy.)
> 
> 
> > package AAA;
> > # Don't care whether $foo is a strict error of $AAA::foo here.
> >


-- 

Father Chrysostomos


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About