Still that's the opinion of a WP-author, not an original source or "historical ... definition"

No, Wikipedia pages are not one author's opinion. And did you read the page? It gives the history of the term.

Well you literally said so:

No, as you said, that came from Wikipedia.

And than I pondered about the possible meaning of "binding" in Perl.

Fair. But not fair to say I claimed package vars are captured.

Oh my holy lord of the nitpickers

You are wrong.

In normal circumstances, I call file-scoped my vars global, and so do many others. And others do the same for package vars.

Neither are actually global, but that's perfectly fine in *those* situations. But clarity *is* required here.

To what combination of file-scoped my var, package vars, and actual globals are referring when you say globals?

And let's not forget that what appears to your example of a global variable uses our, which creates a lexically-scoped variable.

So yeah, if you're going to ponder what constitutes a capture, requesting some specificity isn't nitpicking.

And those are just implemented as package variables in main::

True, but irrelevant. What makes them global is that they can be accessed from anywhere. This is not true of arbitrary variables in the root/main namespace.


In reply to Re^6: Yet Another Program on Closures ~ Steven Lembark ~ TPRC 2025 - YouTube by ikegami
in thread Yet Another Program on Closures ~ Steven Lembark ~ TPRC 2025 - YouTube by LanX

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.