Skip to content

Instantly share code, notes, and snippets.

@dagolden
Created June 19, 2014 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagolden/1695755ac26a28a00f95 to your computer and use it in GitHub Desktop.
Save dagolden/1695755ac26a28a00f95 to your computer and use it in GitHub Desktop.
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