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

[perl #113974] package NAMESPACE manpage comments

Thread Previous
From:
Father Chrysostomos via RT
Date:
July 6, 2012 22:31
Subject:
[perl #113974] package NAMESPACE manpage comments
Message ID:
rt-3.6.HEAD-28836-1341639097-920.113974-15-0@perl.org
On Thu Jul 05 18:15:45 2012, doy@tozt.net wrote:
> On Thu, Jul 05, 2012 at 06:09:17PM -0700, Father Chrysostomos via RT
> wrote:
> > One of my pet peeves:  I can’t use prefix ‘our’ when I use
> $AUTOLOAD,
> > because it might warn.  I have to put ‘our $AUTOLOAD;’ at the top,
> which
> > is sometimes less convenient that putting it next to each use
> (making
> > refactoring easier).

I completely scrambled the grammar there in trying to write it twice. 
I’m surprised the meaning still survived.

> > It should probably only warn if the second ‘our’ is in a different
> package.
> 
> This is in fact the opposite situation to what happens currently -
> there
> is a warning for multiple declarations in the same package, but not if
> they are in different packages(:

And, come to think of it, using ‘our’ in another package in the same
scope is actually useful; so it shouldn’t warn.

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

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=113974

Thread Previous


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