This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use VERSION needs to enable uni8bit hint
[perl5.git] / feature.h
index b32ff93..2d06450 100644 (file)
--- a/feature.h
+++ b/feature.h
@@ -107,6 +107,10 @@ S_enable_feature_bundle(pTHX_ SV *ver)
                        ? FEATURE_BUNDLE_510 :
                          FEATURE_BUNDLE_DEFAULT
               ) << HINT_FEATURE_SHIFT;
+    /* special case */
+    assert(PL_curcop == &PL_compiling);
+    if (FEATURE_UNICODE_IS_ENABLED) PL_hints |=  HINT_UNI_8_BIT;
+    else                           PL_hints &= ~HINT_UNI_8_BIT;
 }
 #endif /* PERL_IN_OP_C */