diff options
Diffstat (limited to 'pod/perl56delta.pod')
-rw-r--r-- | pod/perl56delta.pod | 18 |
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: |