summaryrefslogtreecommitdiff
path: root/pod/perl56delta.pod
diff options
context:
space:
mode:
authorRonald J. Kimball <rjk@linguist.dartmouth.edu>2001-09-21 08:34:40 -0400
committerAbhijit Menon-Sen <ams@wiw.org>2001-09-21 17:08:24 +0000
commit3b825e419da1c361eab06a1e6d287276c0aef241 (patch)
tree3bf9831a1ca2b68cc3821988b1fd9d8cdcc2f6e0 /pod/perl56delta.pod
parentd5115885304a47d8240951ede80584b00fa589b6 (diff)
downloadperl-3b825e419da1c361eab06a1e6d287276c0aef241.tar.gz
avoid v-strings with require/use
Message-Id: <20010921123440.A148500@linguist.thayer.dartmouth.edu> p4raw-id: //depot/perl@12113
Diffstat (limited to 'pod/perl56delta.pod')
-rw-r--r--pod/perl56delta.pod18
1 files changed, 8 insertions, 10 deletions
diff --git a/pod/perl56delta.pod b/pod/perl56delta.pod
index fc0d668726..75d7728fda 100644
--- a/pod/perl56delta.pod
+++ b/pod/perl56delta.pod
@@ -112,16 +112,14 @@ to check if you're running a particular version of Perl:
# new features supported
}
-C<require> and C<use> also have some special magic to support such literals.
-They will be interpreted as a version rather than as a module name:
-
- require v5.6.0; # croak if $^V lt v5.6.0
- use v5.6.0; # same, but croaks at compile-time
-
-Alternatively, the C<v> may be omitted if there is more than one dot:
-
- require 5.6.0;
- use 5.6.0;
+C<require> and C<use> also have some special magic to support such
+literals, but this particular usage should be avoided because it leads to
+misleading error messages under versions of Perl which don't support vector
+strings. Using a true version number will ensure correct behavior in all
+versions of Perl:
+
+ require 5.006; # run time check for v5.6
+ use 5.006_001; # compile time check for v5.6.1
Also, C<sprintf> and C<printf> support the Perl-specific format flag C<%v>
to print ordinals of characters in arbitrary strings: