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
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |