G'day All,

I'm reading through the perldelta for v5.22.0 and have twice come across code like:

local our $var;

Aliasing via reference has a link to perlref: Assigning to References which has:

\local our $scalar # etc.

Updated Modules and Pragmata (under B::Deparse) has:

local our is now deparsed correctly, with the our included.

When I hit it the first time, I thought it was new in v5.22.0: I couldn't recall seeing it previously and assumed I'd be enlightened further down the document.

Given the second hit (which I've just come across) is an update, it's clearly not new in v5.22.0.

I've searched for the string 'local our' in (CPAN v5.22.0 versions of) perlfunc, perlsub and perlref but can't find a match (except for the \local our $scalar already mentioned).

If someone could provide a link to where this is documented, that would be great.

Failing that, can anyone explain what it does.

Thanks in advance.

-- Ken


In reply to local our $var; What does it do? by kcott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.