in reply to Re^5: Yet Another Program on Closures ~ Steven Lembark ~ TPRC 2025 - YouTube
in thread Yet Another Program on Closures ~ Steven Lembark ~ TPRC 2025 - YouTube
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Yet Another Program on Closures ~ Steven Lembark ~ TPRC 2025 - YouTube
by LanX (Saint) on Aug 01, 2025 at 18:33 UTC | |
by ikegami (Patriarch) on Aug 01, 2025 at 19:31 UTC | |
by LanX (Saint) on Aug 04, 2025 at 20:47 UTC | |
by ikegami (Patriarch) on Aug 04, 2025 at 21:39 UTC | |
by LanX (Saint) on Aug 05, 2025 at 21:25 UTC |