diff options
author | Zefram <zefram@fysh.org> | 2017-12-12 10:16:46 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-12-12 10:16:46 +0000 |
commit | d5407247046f2f01c1492998b32b3b148445febe (patch) | |
tree | 1bcaeb1f29f7377462453d90dcc0e4603b855e91 /pod/perlfunc.pod | |
parent | 16ada235c332e017667585e1a5a00ce43a31c529 (diff) | |
download | perl-d5407247046f2f01c1492998b32b3b148445febe.tar.gz |
better document version check aspect of "use"
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 0cf5031c25..18a52113be 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -9389,6 +9389,15 @@ The L<default C<VERSION> method|UNIVERSAL/C<VERSION ( [ REQUIRE ] )>>, inherited from the L<C<UNIVERSAL>|UNIVERSAL> class, croaks if the given version is larger than the value of the variable C<$Module::VERSION>. +The VERSION argument cannot be an arbitrary expression. It only counts +as a VERSION argument if it is a version number literal, starting with +either a digit or C<v> followed by a digit. Anything that doesn't +look like a version literal will be parsed as the start of the LIST. +Nevertheless, many attempts to use an arbitrary expression as a VERSION +argument will appear to work, because L<Exporter>'s C<import> method +handles numeric arguments specially, performing version checks rather +than treating them as things to export. + Again, there is a distinction between omitting LIST (L<C<import>|/import LIST> called with no arguments) and an explicit empty LIST C<()> (L<C<import>|/import LIST> not called). Note that there is no comma |