diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-09 10:11:10 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-09 10:11:10 +0000 |
commit | 2e8342de65fb9cb7fd716c30bbddc9c0f4311ba0 (patch) | |
tree | e4c8c1fc7cc0280876e070e9a929b916d5d90e51 /pod | |
parent | 9210de830a7fbd3725bfbe339a3123439f97aa5d (diff) | |
download | perl-2e8342de65fb9cb7fd716c30bbddc9c0f4311ba0.tar.gz |
Remove the warning "v-string in require/use non portable"
p4raw-id: //depot/perl@32910
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perldiag.pod | 12 | ||||
-rw-r--r-- | pod/perlfunc.pod | 14 |
2 files changed, 4 insertions, 22 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 1dd79a3af0..29d3cd6e02 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4935,18 +4935,6 @@ the version number. (W misc) The version string contains invalid characters at the end, which are being ignored. -=item v-string in use/require is non-portable - -(W portable) The use of v-strings is non-portable to older, pre-5.6, Perls. -If you want your scripts to be backward portable, use the floating -point version number: for example, instead of C<use 5.6.1> say -C<use 5.006_001>. This of course won't make older Perls suddenly start -understanding newer features, but at least they will show a sensible -error message indicating the required minimum version. - -This warning is suppressed if the C<use 5.x.y> is preceded by a -C<use 5.006> (see C<use VERSION> in L<perlfunc/use>). - =item Warning: something's wrong (W) You passed warn() an empty string (the equivalent of C<warn "">) or diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 49eb72921d..3456d9a92a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6873,22 +6873,16 @@ of perl older than the specified one. Specifying VERSION as a literal of the form v5.6.1 should generally be avoided, because it leads to misleading error messages under earlier -versions of Perl that do not support this syntax. The equivalent numeric -version should be used instead. - -Alternatively, you can use a numeric version C<use 5.006> followed by a -v-string version like C<use v5.10.1>, to avoid the unintuitive C<use -5.010_001>. (older perl versions fail gracefully at the first C<use>, -later perl versions understand the v-string syntax in the second). +versions of Perl (that is, prior to 5.6.0) that do not support this +syntax. The equivalent numeric version should be used instead. use v5.6.1; # compile time version check use 5.6.1; # ditto use 5.006_001; # ditto; preferred for backwards compatibility - use 5.006; use 5.6.1; # ditto, for compatibility and readability This is often useful if you need to check the current Perl version before -C<use>ing library modules that have changed in incompatible ways from -older versions of Perl. (We try not to do this more than we have to.) +C<use>ing library modules that won't work with older versions of Perl. +(We try not to do this more than we have to.) Also, if the specified perl version is greater than or equal to 5.9.5, C<use VERSION> will also load the C<feature> pragma and enable all |