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

[perl #113974] package NAMESPACE manpage comments

Thread Previous
Father Chrysostomos via RT
July 6, 2012 22:31
[perl #113974] package NAMESPACE manpage comments
Message ID:
On Thu Jul 05 18:15:45 2012, 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
> > 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

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