summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/op/ver.t16
-rw-r--r--toke.c2
2 files changed, 16 insertions, 2 deletions
diff --git a/t/op/ver.t b/t/op/ver.t
index 0fe7fd1bbb..05bd854b24 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 64b5d80947..0781a9a4a3 100644
--- a/toke.c
+++ b/toke.c
@@ -3773,7 +3773,7 @@ Perl_yylex(pTHX)
TERM(THING);
}
/* avoid v123abc() or $h{v1}, allow C<print v10;> */
- 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';