Created
June 19, 2014 14:26
-
-
Save dagolden/1695755ac26a28a00f95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod | |
index 71f4493..4600fb9 100644 | |
--- a/pod/perlfunc.pod | |
+++ b/pod/perlfunc.pod | |
@@ -4341,12 +4341,13 @@ X<our> X<global> | |
=for Pod::Functions +5.6.0 declare and assign a package variable (lexical scoping) | |
-C<our> makes a lexical alias to a package variable of the same name in the current | |
-package for use within the current lexical scope. | |
+C<our> makes a lexical alias to a package (i.e. global) variable of the | |
+same name in the current package for use within the current lexical scope. | |
C<our> has the same scoping rules as C<my> or C<state>, but C<our> only | |
declares an alias, whereas C<my> or C<state> both declare a variable name and | |
-allocate storage for that name within the current scope. | |
+allocate storage for that name within the current scope. (Package variable | |
+storage is allocated on demand.) | |
This means that when C<use strict 'vars'> is in effect, C<our> lets you use | |
a package variable without qualifying it with the package name, but only within |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment