Make -E require 5.11 features
Rafael Garcia-Suarez [Wed, 19 Dec 2007 13:58:46 +0000 (13:58 +0000)]
p4raw-id: //depot/perl@32648

lib/feature.pm
toke.c

index a62352b..f4e2ef8 100644 (file)
@@ -9,6 +9,8 @@ my %feature = (
     state  => "feature_state",
 );
 
+# NB. the latest bundle must be loaded by the -E switch (see toke.c)
+
 my %feature_bundle = (
     "5.10.0" => [qw(switch say state)],
     "5.11.0" => [qw(switch say state)],
diff --git a/toke.c b/toke.c
index 910852d..b13239e 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3654,7 +3654,7 @@ Perl_yylex(pTHX)
                }
            }
            if (PL_minus_E)
-               sv_catpvs(PL_linestr,"use feature ':5.10';");
+               sv_catpvs(PL_linestr,"use feature ':5.11';");
            sv_catpvs(PL_linestr, "\n");
            PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
            PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);