diff options
author | David Golden <dagolden@cpan.org> | 2009-07-22 17:18:14 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2009-07-22 17:18:14 -0400 |
commit | a1834a8ee289b1433049c65a0b29ec7c74ed44db (patch) | |
tree | bfd5564be7316729596e99f9ad21708e0e5d5a50 | |
parent | 03fee17cde3ff8591688fcf5eac204e151ee53d7 (diff) | |
download | perl-code-review/2009-07-22.tar.gz |
document new package NAMESPACE VERSION syntax in perlfunccode-review/2009-07-22
-rw-r--r-- | pod/perlfunc.pod | 9 |
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. |