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 6, 2012 06:21
Subject:
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
CAOeq1c8ZWuR1OK+i=kk6exp3T1T0PP4qG_1OY97Q=rb1jOuiCg@mail.gmail.com
On Fri, Jul 6, 2012 at 7:34 AM, demerphq <demerphq@gmail.com> wrote:
> A big chunk of the confusion about our and my comes from the fact that
> our is not a declaration like my is. It doesnt create or reserve
> storage. It is a compile hint. my on the other hand is a true
> declaration. It actually creates stuff.

FWIW, I think that's just as confusing.  'our' declares an identifier,
just not one that allocates storage, because package variables never
have storage allocated by declaration, only on demand.

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