This fixes [perl #70884] : use VERSION in BLOCK without semicolon -> syntax error
$INC{"feature.pm"} = 1; # so we don't attempt to load feature.pm
}
-print "1..69\n";
+print "1..73\n";
# Can't require test.pl, as we're testing the use/require mechanism here.
_ok ('isnt', @_);
}
+eval "use 5"; # implicit semicolon
+is ($@, '');
+
+eval "use 5;";
+is ($@, '');
+
+eval "{use 5}"; # [perl #70884]
+is ($@, '');
+
+eval "{use 5 }"; # [perl #70884]
+is ($@, '');
+
# new style version numbers
eval q{ use v5.5.630; };
s = SKIPSPACE1(s);
if (isDIGIT(*s) || (*s == 'v' && isDIGIT(s[1]))) {
s = force_version(s, TRUE);
- if (*s == ';' || (s = SKIPSPACE1(s), *s == ';')) {
+ if (*s == ';' || *s == '}'
+ || (s = SKIPSPACE1(s), (*s == ';' || *s == '}'))) {
start_force(PL_curforce);
NEXTVAL_NEXTTOKE.opval = NULL;
force_next(WORD);