Change 20522 by [EMAIL PROTECTED] on 2003/08/06 13:29:26
Restore everything regarding "v-string deprecation"
back the way it was, because trying to implement what Larry
wants (use 1.2.3 and use Module 1.2.3 should work without
warnings, note that the latter means that also
$VERSION = 1.2.3 should work without warnings) while
trying to warn for 'improper' uses of, seems to be
easier said than done.
Only the deprecation message work and related doc changes
are retracted, not John Peacock's internal v-strings
cleanup work.
Also the %h=(v65=>42) fix stays since Larry okayed it.
In addition, one warning introduced in 5.8.0 is removed
("v-string in use/require non-portable.") since that
obviously doesn't work well with Larry's vision.
Affected files ...
... //depot/maint-5.8/perl/configpm#8 edit
... //depot/maint-5.8/perl/embedvar.h#31 edit
... //depot/maint-5.8/perl/ext/Encode/t/at-cn.t#3 edit
... //depot/maint-5.8/perl/ext/Encode/t/at-tw.t#3 edit
... //depot/maint-5.8/perl/intrpvar.h#25 edit
... //depot/maint-5.8/perl/perlapi.h#28 edit
... //depot/maint-5.8/perl/pod/perldata.pod#14 edit
... //depot/maint-5.8/perl/pod/perldelta.pod#65 edit
... //depot/maint-5.8/perl/pod/perldiag.pod#37 edit
... //depot/maint-5.8/perl/pod/perlfunc.pod#36 edit
... //depot/maint-5.8/perl/pod/perlvar.pod#27 edit
... //depot/maint-5.8/perl/pp_ctl.c#34 edit
... //depot/maint-5.8/perl/pp_hot.c#28 edit
... //depot/maint-5.8/perl/t/lib/warnings/pp_ctl#2 edit
... //depot/maint-5.8/perl/t/lib/warnings/toke#7 edit
... //depot/maint-5.8/perl/t/op/pack.t#11 edit
... //depot/maint-5.8/perl/toke.c#34 edit
Differences ...
==== //depot/maint-5.8/perl/configpm#8 (xtext) ====
Index: perl/configpm
--- perl/configpm#7~20188~ Thu Jul 24 01:07:57 2003
+++ perl/configpm Wed Aug 6 06:29:26 2003
@@ -58,12 +58,7 @@
open CONFIG, ">$Config_PM" or die "Can't open $Config_PM: $!\n";
-my $myver;
-open(CONFIG_SH, 'config.sh') || die "Can't open config.sh: $!";
-while(<CONFIG_SH>) { if (/^version='(.+)'$/) { $myver = $1; last } }
-close(CONFIG_SH);
-die "Can't find version in config.sh\n" unless defined $myver;;
-$myver =~ s/_/./g if $^O eq 'VMS';
+my $myver = sprintf "v%vd", $^V;
printf CONFIG <<'ENDOFBEG', ($myver) x 3;
# This file was created by configpm when Perl was built. Any changes
@@ -97,9 +92,9 @@
die "Perl lib version (%s) doesn't match executable version ($])"
unless $^V;
-my $exever = sprintf("%%vd",$^V);
-$exever eq "%s"
- or die "Perl lib version (%s) doesn't match executable version ($exever)";
+$^V eq %s
+ or die "Perl lib version (%s) doesn't match executable version (" .
+ sprintf("v%%vd",$^V) . ")";
ENDOFBEG
==== //depot/maint-5.8/perl/embedvar.h#31 (text+w) ====
Index: perl/embedvar.h
--- perl/embedvar.h#30~20515~ Wed Aug 6 03:44:50 2003
+++ perl/embedvar.h Wed Aug 6 06:29:26 2003
@@ -286,7 +286,6 @@
#define PL_in_load_module (PERL_GET_INTERP->Iin_load_module)
#define PL_in_my (PERL_GET_INTERP->Iin_my)
#define PL_in_my_stash (PERL_GET_INTERP->Iin_my_stash)
-#define PL_in_require (PERL_GET_INTERP->Iin_require)
#define PL_incgv (PERL_GET_INTERP->Iincgv)
#define PL_initav (PERL_GET_INTERP->Iinitav)
#define PL_inplace (PERL_GET_INTERP->Iinplace)
@@ -605,7 +604,6 @@
#define PL_in_load_module (vTHX->Iin_load_module)
#define PL_in_my (vTHX->Iin_my)
#define PL_in_my_stash (vTHX->Iin_my_stash)
-#define PL_in_require (vTHX->Iin_require)
#define PL_incgv (vTHX->Iincgv)
#define PL_initav (vTHX->Iinitav)
#define PL_inplace (vTHX->Iinplace)
@@ -927,7 +925,6 @@
#define PL_Iin_load_module PL_in_load_module
#define PL_Iin_my PL_in_my
#define PL_Iin_my_stash PL_in_my_stash
-#define PL_Iin_require PL_in_require
#define PL_Iincgv PL_incgv
#define PL_Iinitav PL_initav
#define PL_Iinplace PL_inplace
==== //depot/maint-5.8/perl/ext/Encode/t/at-cn.t#3 (text) ====
Index: perl/ext/Encode/t/at-cn.t
--- perl/ext/Encode/t/at-cn.t#2~20493~ Tue Aug 5 01:43:49 2003
+++ perl/ext/Encode/t/at-cn.t Wed Aug 6 06:29:26 2003
@@ -34,16 +34,16 @@
run_tests('Simplified Chinese only', {
'utf' => (
-pack('U*',12298,26131,32463,12299,31532,19968,21350).
-pack('U*',24406,26352,65306).
-pack('U*',22823,21705,20094,20803,65292,19975,29289,36164,22987,65292).
-pack('U*',20035,32479,22825,12290).
-pack('U*',20113,34892,38632,26045,65292,21697,29289,27969,24418,12290).
-pack('U*',22823,26126,22987,32456,65292,20845,20301,26102,25104,65292).
-pack('U*',26102,20056,20845,40857,20197,24481,22825,12290).
-pack('U*',20094,36947,21464,21270,65292,21508,27491,24615,21629,65292).
-pack('U*',20445,21512,22823,21644,65292,20035,21033,36126,12290).
-pack('U*',39318,20986,24246,29289,65292,19975,22269,21688,23425,12290)
+12298.26131.32463.12299.31532.19968.21350.
+24406.26352.65306.
+22823.21705.20094.20803.65292.19975.29289.36164.22987.65292.
+20035.32479.22825.12290.
+20113.34892.38632.26045.65292.21697.29289.27969.24418.12290.
+22823.26126.22987.32456.65292.20845.20301.26102.25104.65292.
+26102.20056.20845.40857.20197.24481.22825.12290.
+20094.36947.21464.21270.65292.21508.27491.24615.21629.65292.
+20445.21512.22823.21644.65292.20035.21033.36126.12290.
+39318.20986.24246.29289.65292.19975.22269.21688.23425.12290
),
'euc-cn' => join('',
@@ -88,15 +88,15 @@
run_tests('Simplified Chinese + ASCII', {
'utf' => (
-pack('U*',35937,26352,65306,10).
-pack('U*',22825,34892,20581,65292,21531,23376,20197,33258,24378,19981,24687,12290,10).
-pack('U*',28508,40857,21247,29992,65292,38451,22312,19979,20063,12290,32).
-pack('U*',35265,40857,22312,30000,65292,24503,26045,26222,20063,12290,32).
-pack('U*',32456,26085,20094,20094,65292,21453,22797,36947,20063,12290,10).
-pack('U*',25110,36291,22312,28170,65292,36827,26080,21646,20063,12290,39134).
-pack('U*',40857,22312,22825,65292,22823,20154,36896,20063,12290,32).
-pack('U*',20130,40857,26377,24724,65292,30408,19981,21487,20037,20063,12290,10).
-pack('U*',29992,20061,65292,22825,24503,19981,21487,20026,39318,20063,12290)
+35937.26352.65306.10.
+22825.34892.20581.65292.21531.23376.20197.33258.24378.19981.24687.12290.10.
+28508.40857.21247.29992.65292.38451.22312.19979.20063.12290.32.
+35265.40857.22312.30000.65292.24503.26045.26222.20063.12290.32.
+32456.26085.20094.20094.65292.21453.22797.36947.20063.12290.10.
+25110.36291.22312.28170.65292.36827.26080.21646.20063.12290.39134.
+40857.22312.22825.65292.22823.20154.36896.20063.12290.32.
+20130.40857.26377.24724.65292.30408.19981.21487.20037.20063.12290.10.
+29992.20061.65292.22825.24503.19981.21487.20026.39318.20063.12290
),
'cp936' => join(chr(10),
@@ -117,7 +117,7 @@
});
run_tests('Traditional Chinese', {
- 'utf', => pack('U*',20094,65306,20803,12289,20136,12289,21033,12289,35998),
+ 'utf', => 20094.65306.20803.12289.20136.12289.21033.12289.35998,
'gb12345-raw' => 'G,#:T*!":`!"@{!"Uj',
'gbk' => 'Ǭ��Ԫ���ࡢ����ؑ',
});
==== //depot/maint-5.8/perl/ext/Encode/t/at-tw.t#3 (text) ====
Index: perl/ext/Encode/t/at-tw.t
--- perl/ext/Encode/t/at-tw.t#2~20493~ Tue Aug 5 01:43:49 2003
+++ perl/ext/Encode/t/at-tw.t Wed Aug 6 06:29:26 2003
@@ -36,10 +36,10 @@
run_tests('Basic Big5 range', {
'utf' => (
-pack('U*',24093,39640,38525,20043,33495,35028,20846,65292).
-pack('U*',26389,30343,32771,26352,20271,24248,65108).
-pack('U*',25885,25552,35998,20110,23391,38508,20846,65292).
-pack('U*',24799,24218,23493,21566,20197,38477,65108)
+24093.39640.38525.20043.33495.35028.20846.65292.
+26389.30343.32771.26352.20271.24248.65108.
+25885.25552.35998.20110.23391.38508.20846.65292.
+24799.24218.23493.21566.20197.38477.65108
),
'big5' => (join('',
@@ -60,11 +60,11 @@
run_tests('Hong Kong Extensions', {
'utf' => (
-pack('U*',24863,35613,25152,26377,20351,29992,32,80,101,114,108,32).
-pack('U*',22021,26379,21451,65292,32102,25105,21707,22021).
-pack('U*',25903,25345,12289,24847,35211,21644,40723,21237).
-pack('U*',22914,26524,32232,30908,26377,20219,20309,37679,28431).
-pack('U*',65292,35531,21578,35380,25105,21707,12290)
+24863.35613.25152.26377.20351.29992.32.80.101.114.108.32.
+22021.26379.21451.65292.32102.25105.21707.22021.
+25903.25345.12289.24847.35211.21644.40723.21237.
+22914.26524.32232.30908.26377.20219.20309.37679.28431.
+65292.35531.21578.35380.25105.21707.12290
),
'big5-hkscs' => join('',
==== //depot/maint-5.8/perl/intrpvar.h#25 (text) ====
Index: perl/intrpvar.h
--- perl/intrpvar.h#24~20515~ Wed Aug 6 03:44:50 2003
+++ perl/intrpvar.h Wed Aug 6 06:29:26 2003
@@ -560,8 +560,6 @@
PERLVARI(Ihash_seed_set, bool, FALSE) /* Hash initialized? */
-PERLVAR(Iin_require, I32) /* we're compiling a "require" (or
"use") declaration */
-
/* New variables must be added to the very end, before this comment,
* for binary compatibility (the offsets of the old members must not change).
* (Don't forget to add your variable also to perl_clone()!)
==== //depot/maint-5.8/perl/perlapi.h#28 (text+w) ====
Index: perl/perlapi.h
--- perl/perlapi.h#27~20515~ Wed Aug 6 03:44:50 2003
+++ perl/perlapi.h Wed Aug 6 06:29:26 2003
@@ -296,8 +296,6 @@
#define PL_in_my (*Perl_Iin_my_ptr(aTHX))
#undef PL_in_my_stash
#define PL_in_my_stash (*Perl_Iin_my_stash_ptr(aTHX))
-#undef PL_in_require
-#define PL_in_require (*Perl_Iin_require_ptr(aTHX))
#undef PL_incgv
#define PL_incgv (*Perl_Iincgv_ptr(aTHX))
#undef PL_initav
==== //depot/maint-5.8/perl/pod/perldata.pod#14 (text) ====
Index: perl/pod/perldata.pod
--- perl/pod/perldata.pod#13~20518~ Wed Aug 6 04:26:56 2003
+++ perl/pod/perldata.pod Wed Aug 6 06:29:26 2003
@@ -340,54 +340,35 @@
=head3 Version Strings
B<Note:> Version Strings (v-strings) have been deprecated. They will
-be removed in some future release after Perl 5.8.1. The marginal
-benefits of v-strings were greatly outweighed by the potential for
-Surprise and Confusion.
+not be available after Perl 5.8. The marginal benefits of v-strings
+were greatly outweighed by the potential for Surprise and Confusion.
-The rest of this section describes v-strings as they were between and
-including Perls 5.6.0 and 5.8.0. It is retained here for maintenance
-purposes. Note that the equivalence of strings and v-strings is
-especially deprecated. For example, version objects will stringify
-as "5.6.0", not as "\5\6\0". See L</"Version Objects">.
-
-[OBSOLETE] A literal of the form C<v1.20.300.4000> is parsed as a
-string composed of characters with the specified ordinals. This form,
-known as v-strings, provides an alternative, more readable way to
-construct strings, rather than use the somewhat less readable
-interpolation form C<"\x{1}\x{14}\x{12c}\x{fa0}">. This is useful for
-representing Unicode strings, and for comparing version "numbers"
-using the string comparison operators, C<cmp>, C<gt>, C<lt> etc. If
-there are two or more dots in the literal, the leading C<v> may be
-omitted.
+A literal of the form C<v1.20.300.4000> is parsed as a string composed
+of characters with the specified ordinals. This form, known as
+v-strings, provides an alternative, more readable way to construct
+strings, rather than use the somewhat less readable interpolation form
+C<"\x{1}\x{14}\x{12c}\x{fa0}">. This is useful for representing
+Unicode strings, and for comparing version "numbers" using the string
+comparison operators, C<cmp>, C<gt>, C<lt> etc. If there are two or
+more dots in the literal, the leading C<v> may be omitted.
print v9786; # prints UTF-8 encoded SMILEY, "\x{263a}"
print v102.111.111; # prints "foo"
print 102.111.111; # same
-[OBSOLETE] Note that using the v-strings for IPv4 addresses is not
-portable unless you also use the inet_aton()/inet_ntoa() routines of
-the Socket package.
-
-=head3 Version Objects
-
-The most important intended use of v-strings (see L/"Version Strings">)
-will live on as "version objects". Version objects can be used to
-request a minimum acceptable version of either Perl itself or of a
-module. The literals of the form I<number.number.number ...> used in
-C<use> and C<require>, for example
-
- use 5.6.0;
- require 5.8.1;
- use Module 1.2.3;
-
-are version ojects. The C<$^V> special variable also contains the
+Such literals are accepted by both C<require> and C<use> for
+doing a version check. The C<$^V> special variable also contains the
running Perl interpreter's version in this form. See L<perlvar/$^V>.
+Note that using the v-strings for IPv4 addresses is not portable unless
+you also use the inet_aton()/inet_ntoa() routines of the Socket package.
Note that since Perl 5.8.1 the single-number v-strings (like C<v65>)
are not v-strings before the C<< => >> operator (which is usually used
to separate a hash key from a hash value), instead they are interpreted
as literal strings ('v65'). They were v-strings from Perl 5.6.0 to
Perl 5.8.0, but that caused more confusion and breakage than good.
+Multi-number v-strings like C<v65.66> and C<65.66.67> continue to
+be v-strings always.
=head3 Special Literals
==== //depot/maint-5.8/perl/pod/perldelta.pod#65 (text) ====
Index: perl/pod/perldelta.pod
--- perl/pod/perldelta.pod#64~20516~ Wed Aug 6 03:47:28 2003
+++ perl/pod/perldelta.pod Wed Aug 6 06:29:26 2003
@@ -92,8 +92,7 @@
%h = ( 'v65' => 42 );
The multi-number v-strings like v65.66 and 65.66.67 still continue to
-be v-strings in Perl 5.8. Note, however, that v-strings as a whole
-are now deprecated, see L</"Deprecation Warnings">.
+be v-strings in Perl 5.8.
=head2 (Win32) The -C Switch Has Been Repurposed
@@ -202,17 +201,6 @@
some deprecation warnings, these warnings have now been added.
Finally, a reminder of an impending feature removal.
-=head3 (New) Version strings (v-strings) are deprecated
-
-Version Strings (v-strings) have been deprecated and they will be
-removed in some future release of Perl. Each v-string will trigger
-the warning C<v-strings are deprecated>. The marginal benefits of
-v-strings were greatly outweighed by the potential for Surprise and
-Confusion. If you really want to continue using v-strings but not to
-see the deprecation warnings, use:
-
- no warnings 'deprecated';
-
=head3 (Reminder) Pseudo-hashes are deprecated (really)
Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in
@@ -662,11 +650,6 @@
Something modified the values being iterated over. This is not good.
-=head2 New "v-strings are deprecated"
-
-The marginal benefits of v-strings were greatly outweighed by the
-potential for Surprise and Confusion.
-
=head1 Changed Internals
These news matter to you only if you either write XS code or like to
@@ -906,17 +889,7 @@
=item *
-While the v-strings were deprecated now, we will think about
-new ways of supporting (again) version numbers of the "1.2.3"
-kind (as opposed to the "1.23" kind).
-
-=item *
-
5.005 Threads Will Be Removed
-
-=item *
-
-V-strings (Version Strings) Will Be Removed
=item *
==== //depot/maint-5.8/perl/pod/perldiag.pod#37 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod#36~20521~ Wed Aug 6 04:59:35 2003
+++ perl/pod/perldiag.pod Wed Aug 6 06:29:26 2003
@@ -4419,14 +4419,6 @@
its equivalent C<BEGIN> block found an internal inconsistency with
the version number.
-=item Version objects are deprecated outside of use/require
-
-(D deprecated) What used to be "version strings" or v-strings is
-deprecated. What looks like those can still be used, but only when
-using C<use> or C<require>, and these are called "Version Objects".
-See L<perldata/"Version Strings">, L<perlfunc/use>, and
-L<perlfunc/require> for more information.
-
=item Warning: something's wrong
(W) You passed warn() an empty string (the equivalent of C<warn "">) or
==== //depot/maint-5.8/perl/pod/perlfunc.pod#36 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#35~20519~ Wed Aug 6 04:35:18 2003
+++ perl/pod/perlfunc.pod Wed Aug 6 06:29:26 2003
@@ -4017,17 +4017,15 @@
specified by EXPR or by C<$_> if EXPR is not supplied.
VERSION may be either a numeric argument such as 5.006, which will be
-compared to C<$]>, or a literal of the form v5.6.1 or 5.6.1, which
-will be compared to C<$^V> (aka $PERL_VERSION). A fatal error is
-produced at run time if VERSION is greater than the version of the
-current Perl interpreter. Compare with L</use>, which can do a
-similar check at compile time.
-
-Specifying VERSION as a literal of the form v5.6.1 or 5.6.1 is bad for
-backwards compatibility, because it leads to misleading error messages
-under earlier versions of Perl which do not support this syntax. The
-equivalent numeric version should be used instead if compatibility
-with Perl versions lower than 5.6.0 is required.
+compared to C<$]>, or a literal of the form v5.6.1, which will be compared
+to C<$^V> (aka $PERL_VERSION). A fatal error is produced at run time if
+VERSION is greater than the version of the current Perl interpreter.
+Compare with L</use>, which can do a similar check at compile time.
+
+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 which do not support this syntax. The equivalent numeric
+version should be used instead.
require v5.6.1; # run time version check
require 5.6.1; # ditto
@@ -6134,17 +6132,16 @@
except that Module I<must> be a bareword.
VERSION may be either a numeric argument such as 5.006, which will be
-compared to C<$]>, or a literal of the form v5.6.1 or 5.6.1, which
-will be compared to C<$^V> (aka $PERL_VERSION. A fatal error is
-produced if VERSION is greater than the version of the current Perl
-interpreter; Perl will not attempt to parse the rest of the file.
-Compare with L</require>, which can do a similar check at run time.
-
-Specifying VERSION as a literal of the form v5.6.1 or 5.6.1 is bad for
-backwards compatibility, because it leads to misleading error messages
-under earlier versions of Perl which do not support this syntax. The
-equivalent numeric version should be used instead if compatibility
-with Perl versions lower than 5.6.0 is required.
+compared to C<$]>, or a literal of the form v5.6.1, which will be compared
+to C<$^V> (aka $PERL_VERSION. A fatal error is produced if VERSION is
+greater than the version of the current Perl interpreter; Perl will not
+attempt to parse the rest of the file. Compare with L</require>, which can
+do a similar check at run time.
+
+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 which 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
==== //depot/maint-5.8/perl/pod/perlvar.pod#27 (text) ====
Index: perl/pod/perlvar.pod
--- perl/pod/perlvar.pod#26~20519~ Wed Aug 6 04:35:18 2003
+++ perl/pod/perlvar.pod Wed Aug 6 06:29:26 2003
@@ -1158,9 +1158,11 @@
=item $^V
-The revision, version, and subversion of the Perl interpreter,
-represented as a version object (see L<perldata/"Version Objects").
-For example in Perl v5.6.0 C<$^V eq v5.6.0> will return true.
+The revision, version, and subversion of the Perl interpreter, represented
+as a string composed of characters with those ordinals. Thus in Perl v5.6.0
+it equals C<chr(5) . chr(6) . chr(0)> and will return true for
+C<$^V eq v5.6.0>. Note that the characters in this string value can
+potentially be in Unicode range.
This can be used to determine whether the Perl interpreter executing a
script is in the right range of versions. (Mnemonic: use ^V for Version
==== //depot/maint-5.8/perl/t/lib/warnings/pp_ctl#2 (text) ====
Index: perl/t/lib/warnings/pp_ctl
--- perl/t/lib/warnings/pp_ctl#1~17645~ Fri Jul 19 12:29:57 2002
+++ perl/t/lib/warnings/pp_ctl Wed Aug 6 06:29:26 2003
@@ -222,18 +222,6 @@
Use of uninitialized value in print at (eval 1) line 1.
########
# pp_ctl.c
-use warnings 'portable';
-eval 'use 5.6.1';
-EXPECT
-v-string in use/require non-portable at (eval 1) line 2.
-########
-# pp_ctl.c
-use warnings 'portable';
-eval 'use v5.6.1';
-EXPECT
-v-string in use/require non-portable at (eval 1) line 2.
-########
-# pp_ctl.c
use warnings;
{
no warnings;
==== //depot/maint-5.8/perl/t/lib/warnings/toke#7 (text) ====
Index: perl/t/lib/warnings/toke
--- perl/t/lib/warnings/toke#6~20519~ Wed Aug 6 04:35:18 2003
+++ perl/t/lib/warnings/toke Wed Aug 6 06:29:26 2003
@@ -799,12 +799,4 @@
$s = "(@-)(@+)";
EXPECT
-########
-# toke.c
-use warnings 'deprecated';
-$v = v65.66;
-no warnings 'deprecated';
-$v = v65.66;
-EXPECT
-Version objects are deprecated outside of use/require at - line 3.
==== //depot/maint-5.8/perl/t/op/pack.t#11 (xtext) ====
Index: perl/t/op/pack.t
--- perl/t/op/pack.t#10~20126~ Thu Jul 10 15:20:02 2003
+++ perl/t/op/pack.t Wed Aug 6 06:29:26 2003
@@ -625,16 +625,13 @@
}
-{
- no warnings 'deprecated'; # v-strings
- SKIP: {
- skip("(EBCDIC and) version strings are bad idea", 2) if $Is_EBCDIC;
-
- is("1.20.300.4000", sprintf "%vd", pack("U*",1,20,300,4000));
- is("1.20.300.4000", sprintf "%vd", pack(" U*",1,20,300,4000));
- }
- isnt(v1.20.300.4000, sprintf "%vd", pack("C0U*",1,20,300,4000));
+SKIP: {
+ skip("(EBCDIC and) version strings are bad idea", 2) if $Is_EBCDIC;
+
+ is("1.20.300.4000", sprintf "%vd", pack("U*",1,20,300,4000));
+ is("1.20.300.4000", sprintf "%vd", pack(" U*",1,20,300,4000));
}
+isnt(v1.20.300.4000, sprintf "%vd", pack("C0U*",1,20,300,4000));
my $rslt = $Is_EBCDIC ? "156 67" : "199 162";
is(join(" ", unpack("C*", chr(0x1e2))), $rslt);
@@ -659,10 +656,7 @@
is("@{[unpack('C*', pack('U*', 100, 200))]}", "100 195 136");
# does pack U0C create Unicode?
- {
- no warnings 'deprecated'; # v-strings
- is("@{[pack('U0C*', 100, 195, 136)]}", v100.v200);
- }
+ is("@{[pack('U0C*', 100, 195, 136)]}", v100.v200);
# does pack C0U create characters?
is("@{[pack('C0U*', 100, 200)]}", pack("C*", 100, 195, 136));
==== //depot/maint-5.8/perl/toke.c#34 (text) ====
Index: perl/toke.c
--- perl/toke.c#33~20519~ Wed Aug 6 04:35:18 2003
+++ perl/toke.c Wed Aug 6 06:29:26 2003
@@ -4797,7 +4797,6 @@
case KEY_require:
s = skipspace(s);
- PL_in_require = 1;
if (isDIGIT(*s)) {
s = force_version(s, FALSE);
}
@@ -4811,7 +4810,6 @@
else if (*s == '<')
yyerror("<> should be quotes");
}
- PL_in_require = 0;
UNI(OP_REQUIRE);
case KEY_reset:
@@ -5174,7 +5172,6 @@
if (PL_expect != XSTATE)
yyerror("\"use\" not allowed in expression");
s = skipspace(s);
- PL_in_require = 1;
if (isDIGIT(*s) || (*s == 'v' && isDIGIT(s[1]))) {
s = force_version(s, TRUE);
if (*s == ';' || (s = skipspace(s), *s == ';')) {
@@ -5190,7 +5187,6 @@
s = force_word(s,WORD,FALSE,TRUE,FALSE);
s = force_version(s, FALSE);
}
- PL_in_require = 0;
yylval.ival = 1;
OPERATOR(USE);
@@ -7969,9 +7965,7 @@
{
char *pos = s;
char *start = s;
-
- if (*pos == 'v')
- pos++;
+ if (*pos == 'v') pos++; /* get past 'v' */
while (pos < PL_bufend && (isDIGIT(*pos) || *pos == '_'))
pos++;
if ( *pos != '.') {
@@ -7995,9 +7989,6 @@
sv_setpvn(sv, "", 0);
- if (!PL_in_require && ckWARN(WARN_DEPRECATED))
- Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
- "Version objects are deprecated outside of use/require");
for (;;) {
rev = 0;
{
@@ -8016,7 +8007,6 @@
"Integer overflow in decimal number");
}
}
-
#ifdef EBCDIC
if (rev > 0x7FFFFFFF)
Perl_croak(aTHX_ "In EBCDIC the v-string components cannot exceed
2147483647");
End of Patch.