summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJames Mastros <james@mastros.biz>2010-04-23 11:35:28 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2010-04-23 11:35:28 +0200
commit6fb472bab4fadd0ae2ca9624b74596afab4fb8cb (patch)
tree976ba5d5a50592402b53396f07d71f444e88fcfa /toke.c
parent044d64a877be884e81013d53b56accbddfe731cc (diff)
downloadperl-6fb472bab4fadd0ae2ca9624b74596afab4fb8cb.tar.gz
New deprecation warning: Dot after %s literal is concatenation
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index b5236dadbf..7abcfb756f 100644
--- a/toke.c
+++ b/toke.c
@@ -13117,6 +13117,15 @@ 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)