From: Jarkko Hietaniemi Date: Sun, 27 May 2001 01:41:33 +0000 (+0000) Subject: Allow 'eval "v200"' to work (part of 20000323.059); fix as X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=62ec34bdab38578dfeaafdadbf57d3722a2f6e0c;p=p5sagit%2Fp5-mst-13.2.git Allow 'eval "v200"' to work (part of 20000323.059); fix as envisioned by Sarathy. p4raw-id: //depot/perl@10227 --- diff --git a/t/op/ver.t b/t/op/ver.t index 0fe7fd1..05bd854 100755 --- a/t/op/ver.t +++ b/t/op/ver.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..33\n"; +print "1..37\n"; my $test = 1; @@ -222,3 +222,17 @@ okeq(v5.6.0 lt v5.7.0,1,"v5.6.0 lt v5.7.0 fails"); # floating point too messy # my $v = ord($^V)+ord(substr($^V,1,1))/1000+ord(substr($^V,2,1))/1000000; # okeq($v,$],"\$^V and \$] do not match"); + +# 34..37: part of 20000323.059 +print "not " unless v200 eq chr(200); +print "ok 34\n"; + +print "not " unless v200 eq +v200; +print "ok 35\n"; + +print "not " unless v200 eq eval "v200"; +print "ok 36\n"; + +print "not " unless v200 eq eval "+v200"; +print "ok 37\n"; + diff --git a/toke.c b/toke.c index 64b5d80..0781a9a 100644 --- a/toke.c +++ b/toke.c @@ -3773,7 +3773,7 @@ Perl_yylex(pTHX) TERM(THING); } /* avoid v123abc() or $h{v1}, allow C */ - else if (!isALPHA(*start) && (PL_expect == XTERM || PL_expect == XREF)) { + else if (!isALPHA(*start) && (PL_expect == XTERM || PL_expect == XREF || PL_expect == XSTATE)) { char c = *start; GV *gv; *start = '\0';