From: Jesse Vincent Date: Wed, 5 May 2010 18:40:59 +0000 (-0400) Subject: Revert "New deprecation warning: Dot after %s literal is concatenation" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae18566af0ea83777df8fec61aac717652bf0214;p=p5sagit%2Fp5-mst-13.2.git Revert "New deprecation warning: Dot after %s literal is concatenation" This reverts commit 6fb472bab4fadd0ae2ca9624b74596afab4fb8cb. Zefram asked me to revert this as he's going to be doing something more pluggable --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 6d6322a..cf0c62a 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1534,17 +1534,6 @@ you called it with no args and both C<$@> and C<$_> were empty. See Server error. -=item Dot after %s literal is concatenation - -(D) You had something like 0x123.456 in your code. This is currently -parsed as the hexadecimal number 0x123 concatenated with the decimal -number 456, not 0x123 + 0x456/0x1000 -- we only support decimal -decimal points. If you meant it to be a fraction, you'll need to use -Math::BigFloat's from_hex (or friends). If you meant it to be -concatenation, just put spaces around the dot to make it clearer. In -5.14.0, we expect to change this to mean a hex fraction. (Of course, -everything above applies to octal and binary constants, too.) - =item %s does not define %s::VERSION--version check failed (F) You said something like "use Module 42" but the Module did not diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 914c988..2236442 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -960,20 +960,3 @@ Use of := for an empty attribute list is deprecated at - line 36. Use of := for an empty attribute list is deprecated at - line 38. Use of := for an empty attribute list is deprecated at - line 41. Use of := for an empty attribute list is deprecated at - line 42. -######## -# toke.c -use warnings 'deprecation'; -my $a = 0123.456; -my $b = 0x123.456; -my $c = 0b101.010; -no warnings 'deprecation'; -my $d = 0765.432; -EXPECT -Dot after octal literal is concatenation at - line 1. -Dot after hex literal is concatenation at - line 2. -Dot after binary literal is concatenation at - line 3. -######## -# toke.c -use warnings; -my @c = 0x123..0x456; -EXPECT diff --git a/toke.c b/toke.c index 7ad03b8..dea5274 100644 --- a/toke.c +++ b/toke.c @@ -13096,15 +13096,6 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX), "Misplaced _ in number"); } - /* Dot here is historically concat, not a radix point. - Deprecate that; it's confusing, and gets in the way of - hex(ish) fractions... but '..' is OK. */ - if (s[0] == '.' && - s[1] != '.') { - Perl_ck_warner(aTHX_ packWARN(WARN_DEPRECATED), - "Dot after %s literal is concatenation", base); - } - sv = newSV(0); if (overflowed) { if (n > 4294967295.0)