summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlfunc.pod9
1 files changed, 8 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 23e5535e4f..891727a5a4 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4072,8 +4072,10 @@ Examples:
The same template may generally also be used in unpack().
+=item package NAMESPACE VERSION
+X<package> X<module> X<namespace> X<version>
+
=item package NAMESPACE
-X<package> X<module> X<namespace>
=item package
@@ -4093,6 +4095,11 @@ If the package name is null, the C<main> package as assumed. That is,
C<$::sail> is equivalent to C<$main::sail> (as well as to C<$main'sail>,
still seen in older code).
+If VERSION is provided, C<package> also sets the C<$VERSION> variable in the
+given namespace. VERSION must be be a numeric literal or v-string; it is
+parsed exactly the same way as a VERSION argument to C<use MODULE VERSION>.
+C<$VERSION> should only be set once per package.
+
See L<perlmod/"Packages"> for more information about packages, modules,
and classes. See L<perlsub> for other scoping issues.