summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-06 13:56:45 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-06 13:56:45 +0000
commit3cb0bbe5af1ac1b0e46bbee66b7b457629e7ffa3 (patch)
tree53e06029d69787129e9b2245a4648e61fcdb73e1 /toke.c
parentc4410b1b816ab84616660ccfbce83a639eb24398 (diff)
downloadperl-3cb0bbe5af1ac1b0e46bbee66b7b457629e7ffa3.tar.gz
support sprintf("v%v", v1.2.3) (works on any string argument, in
fact); add tests for version tuples p4raw-id: //depot/perl@4998
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 55ffda33a5..22db523112 100644
--- a/toke.c
+++ b/toke.c
@@ -1675,7 +1675,7 @@ S_intuit_more(pTHX_ register char *s)
* Not a method if it's really "print foo $bar"
* Method if it's really "foo package::" (interpreted as package->foo)
* Not a method if bar is known to be a subroutne ("sub bar; foo bar")
- * Not a method if bar is a filehandle or package, but is quotd with
+ * Not a method if bar is a filehandle or package, but is quoted with
* =>
*/
@@ -6894,6 +6894,8 @@ Perl_scan_num(pTHX_ char *start)
sv_setpvn(sv, "", 0);
do {
+ if (*s == '0' && isDIGIT(s[1]))
+ yyerror("Octal number in vector unsupported");
rev = atoi(s);
s = ++pos;
while (isDIGIT(*pos))
@@ -6907,6 +6909,8 @@ Perl_scan_num(pTHX_ char *start)
nshift *= 1000;
} while (*pos == '.' && isDIGIT(pos[1]));
+ if (*s == '0' && isDIGIT(s[1]))
+ yyerror("Octal number in vector unsupported");
rev = atoi(s);
s = pos;
tmpend = uv_to_utf8(tmpbuf, rev);