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

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
From:
David Golden
Date:
July 5, 2012 17:19
Subject:
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
CAOeq1c_Rxg97c=M7i7MbtEE=QmGo+mn3zvuxZDgf0K9MHNWm2A@mail.gmail.com
On Thu, Jul 5, 2012 at 7:03 PM, Father Chrysostomos via RT
<perlbug-followup@perl.org> wrote:
> ‘our’ could certainly be documented better.  Somewhere we need to state
> it nice and clearly like this:
>
> C<our> makes a lexical alias to a package variable.

Good way to put it.

In commit 66b3001, I've adapted that and tried to clarify
documentation for 'our'.

In commit 4d457ce, I have removed "obsolete" from the abstract for
vars.pm and instead added a phrase in the first paragraph that uses
the term 'discouraged' and clarifies that it is discouraged for use
within a single scope. I think that better limits *when* vars.pm is
discouraged, as the rest of the documentation explains the scoping of
vars.pm and use with Self/AutoLoad, for which it may indeed be
appropriate.

In commit 4dd9551, I clarified the 'package' documentation to refer to
'lexically-scoped' variables rather than 'lexical' variables, which
might alleviate some confusion (short of documentation-wide fixes to
the confusing term 'dynamic').

Ricardo and I apparently also collided on some other commits to
clarify vars.pm behavior (which is across even file-scope) and once he
integrates his commits, collectively, I think these all are sufficient
to close this ticket.

-- David

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