3 # Regenerate (overwriting only if changed):
8 # from information hardcoded into this script and from two #defines
11 # This script is normally invoked from regen.pl.
14 require './regen/regen_lib.pl';
20 ###########################################################################
23 # (feature name) => (internal name, used in %^H and macro names)
29 evalbytes => 'evalbytes',
30 current_sub => '__SUB__',
31 refaliasing => 'refaliasing',
32 postderef_qq => 'postderef_qq',
33 unicode_eval => 'unieval',
34 declared_refs => 'myref',
35 unicode_strings => 'unicode',
37 signatures => 'signatures',
40 # NOTE: If a feature is ever enabled in a non-contiguous range of Perl
41 # versions, any code below that uses %BundleRanges will have to
42 # be changed to account.
44 # 5.odd implies the next 5.even, but an explicit 5.even can override it.
45 my %feature_bundle = (
46 all => [ keys %feature ],
48 "5.9.5" => [qw(say state switch)],
49 "5.10" => [qw(say state switch)],
50 "5.11" => [qw(say state switch unicode_strings)],
51 "5.13" => [qw(say state switch unicode_strings)],
52 "5.15" => [qw(say state switch unicode_strings unicode_eval
53 evalbytes current_sub fc)],
54 "5.17" => [qw(say state switch unicode_strings unicode_eval
55 evalbytes current_sub fc)],
56 "5.19" => [qw(say state switch unicode_strings unicode_eval
57 evalbytes current_sub fc)],
58 "5.21" => [qw(say state switch unicode_strings unicode_eval
59 evalbytes current_sub fc)],
60 "5.23" => [qw(say state switch unicode_strings unicode_eval
61 evalbytes current_sub fc postderef_qq)],
62 "5.25" => [qw(say state switch unicode_strings unicode_eval
63 evalbytes current_sub fc postderef_qq)],
64 "5.27" => [qw(say state switch unicode_strings unicode_eval
65 evalbytes current_sub fc postderef_qq bitwise)],
66 "5.29" => [qw(say state switch unicode_strings unicode_eval
67 evalbytes current_sub fc postderef_qq bitwise)],
68 "5.31" => [qw(say state switch unicode_strings unicode_eval
69 evalbytes current_sub fc postderef_qq bitwise)],
72 my @noops = qw( postderef lexical_subs );
73 my @removed = qw( array_base );
76 ###########################################################################
77 # More data generated from the above
79 if (keys %feature > 32) {
80 die "cop_features only has room for 32 features";
85 for my $feature (sort keys %feature) {
86 $feature_bits{$feature} = $mask;
90 for (keys %feature_bundle) {
91 next unless /^5\.(\d*[13579])\z/;
92 $feature_bundle{"5.".($1+1)} ||= $feature_bundle{$_};
95 my %UniqueBundles; # "say state switch" => 5.10
96 my %Aliases; # 5.12 => 5.11
97 for( sort keys %feature_bundle ) {
98 my $value = join(' ', sort @{$feature_bundle{$_}});
99 if (exists $UniqueBundles{$value}) {
100 $Aliases{$_} = $UniqueBundles{$value};
103 $UniqueBundles{$value} = $_;
107 my %BundleRanges; # say => ['5.10', '5.15'] # unique bundles for values
109 sort { $a eq 'default' ? -1 : $b eq 'default' ? 1 : $a cmp $b }
110 values %UniqueBundles
112 next if $bund =~ /[^\d.]/ and $bund ne 'default';
113 for (@{$feature_bundle{$bund}}) {
114 if (@{$BundleRanges{$_} ||= []} == 2) {
115 $BundleRanges{$_}[1] = $bund
118 push @{$BundleRanges{$_}}, $bund;
127 open "perl.h", "<", "perl.h" or die "$0 cannot open perl.h: $!";
128 while (readline "perl.h") {
129 next unless /#\s*define\s+(HINT_FEATURE_MASK|HINT_UNI_8_BIT)/;
130 my $is_u8b = $1 =~ 8;
131 /(0x[A-Fa-f0-9]+)/ or die "No hex number in:\n\n$_\n ";
136 my $hex = $HintMask = $1;
137 my $bits = sprintf "%b", oct $1;
138 $bits =~ /^0*1+(0*)\z/
139 or die "Non-contiguous bits in $bits (binary for $hex):\n\n$_\n ";
140 $HintShift = length $1;
142 length sprintf "%b", scalar keys %UniqueBundles;
143 $bits =~ /1{$bits_needed}/
144 or die "Not enough bits (need $bits_needed)"
145 . " in $bits (binary for $hex):\n\n$_\n ";
147 if ($Uni8Bit && $HintMask) { last }
149 die "No HINT_FEATURE_MASK defined in perl.h" unless $HintMask;
150 die "No HINT_UNI_8_BIT defined in perl.h" unless $Uni8Bit;
155 ('default', grep !/[^\d.]/, sort values %UniqueBundles);
158 ###########################################################################
159 # Open files to be generated
162 open_new($_, '>', { by => 'regen/feature.pl' });
163 } 'lib/feature.pm', 'feature.h';
166 ###########################################################################
167 # Generate lib/feature.pm
170 last if /^FEATURES$/ ;
177 if (!defined $long or length $long < length) {
184 print $pm "our %feature = (\n";
185 my $width = length longest keys %feature;
186 for(sort { length $a <=> length $b || $a cmp $b } keys %feature) {
187 print $pm " $_" . " "x($width-length)
188 . " => 'feature_$feature{$_}',\n";
192 print $pm "\nmy %feature_bits = (\n";
193 for (sort keys %feature_bits) {
194 printf $pm " %-*s => %#06x,\n", $width, $_, $feature_bits{$_};
198 print $pm "our %feature_bundle = (\n";
199 my $bund_width = length longest values %UniqueBundles;
200 for( sort { $UniqueBundles{$a} cmp $UniqueBundles{$b} }
201 keys %UniqueBundles ) {
202 my $bund = $UniqueBundles{$_};
203 print $pm qq' "$bund"' . " "x($bund_width-length $bund)
204 . qq' => [qw($_)],\n';
208 for (sort keys %Aliases) {
210 qq'\$feature_bundle{"$_"} = \$feature_bundle{"$Aliases{$_}"};\n';
213 print $pm "my \%noops = (\n";
214 print $pm " $_ => 1,\n", for @noops;
217 print $pm "my \%removed = (\n";
218 print $pm " $_ => 1,\n", for @removed;
223 our \$hint_shift = $HintShift;
224 our \$hint_mask = $HintMask;
225 our \@hint_bundles = qw( @HintedBundles );
227 # This gets set (for now) in \$^H as well as in %^H,
228 # for runtime speed of the uc/lc/ucfirst/lcfirst functions.
229 # See HINT_UNI_8_BIT in perl.h.
230 our \$hint_uni8bit = $Uni8Bit;
235 last if /^PODTURES$/ ;
239 select +(select($pm), $~ = 'PODTURES')[0];
241 ^<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
242 $::bundle, $::feature
245 for ('default', sort grep /\.\d[02468]/, keys %feature_bundle) {
247 $::feature = join ' ', @{$feature_bundle{$_}};
256 read_only_bottom_close_and_rename($pm);
259 ###########################################################################
264 #ifndef PERL_FEATURE_H_
265 #define PERL_FEATURE_H_
267 #if defined(PERL_CORE) || defined (PERL_EXT)
269 #define HINT_FEATURE_SHIFT $HintShift
273 for (sort keys %feature_bits) {
274 printf $h "#define FEATURE_%s_BIT%*s %#06x\n", uc($feature{$_}),
275 $width-length($feature{$_}), "", $feature_bits{$_};
280 for (@HintedBundles) {
281 (my $key = uc) =~ y/.//d;
282 print $h "#define FEATURE_BUNDLE_$key ", $count++, "\n";
286 #define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
288 #define CURRENT_HINTS \
289 (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
290 #define CURRENT_FEATURE_BUNDLE \
291 ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
293 #define FEATURE_IS_ENABLED_MASK(mask) \
294 ((CURRENT_HINTS & HINT_LOCALIZE_HH) \
295 ? (PL_curcop->cop_features & (mask)) : FALSE)
297 /* The longest string we pass in. */
300 my $longest_internal_feature_name = longest values %feature;
302 #define MAX_FEATURE_LEN (sizeof("$longest_internal_feature_name")-1)
307 sort { length $a <=> length $b || $a cmp $b } keys %feature
310 map { (my $__ = uc) =~ y/.//d; $__ } @{$BundleRanges{$_}};
311 my $name = $feature{$_};
313 if ($last && $first eq 'DEFAULT') { # '>= DEFAULT' warns
315 #define FEATURE_${NAME}_IS_ENABLED \\
317 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last \\
318 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
319 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
326 #define FEATURE_${NAME}_IS_ENABLED \\
328 (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_$first && \\
329 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last) \\
330 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
331 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
338 #define FEATURE_${NAME}_IS_ENABLED \\
340 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_$first \\
341 || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
342 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
349 #define FEATURE_${NAME}_IS_ENABLED \\
351 CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
352 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT) \\
361 #define SAVEFEATUREBITS() SAVEI32(PL_compiling.cop_features)
363 #define CLEARFEATUREBITS() (PL_compiling.cop_features = 0)
365 #define STOREFEATUREBITSHH(hh) \\
366 (hv_stores((hh), "feature/bits", newSVuv(PL_compiling.cop_features)))
368 #define FETCHFEATUREBITSHH(hh) \\
370 SV **fbsv = hv_fetchs((hh), "feature/bits", FALSE); \\
371 PL_compiling.cop_features = fbsv ? SvUV(*fbsv) : 0; \\
374 #endif /* PERL_CORE or PERL_EXT */
377 PERL_STATIC_INLINE void
378 S_enable_feature_bundle(pTHX_ SV *ver)
380 SV *comp_ver = sv_newmortal();
381 PL_hints = (PL_hints &~ HINT_FEATURE_MASK)
385 for (reverse @HintedBundles[1..$#HintedBundles]) { # skip default
387 if ($numver eq '5.10') { $numver = '5.009005' } # special case
388 else { $numver =~ s/\./.0/ } # 5.11 => 5.011
389 (my $macrover = $_) =~ y/.//d;
391 (sv_setnv(comp_ver, $numver),
392 vcmp(ver, upg_version(comp_ver, FALSE)) >= 0)
393 ? FEATURE_BUNDLE_$macrover :
398 FEATURE_BUNDLE_DEFAULT
399 ) << HINT_FEATURE_SHIFT;
401 assert(PL_curcop == &PL_compiling);
402 if (FEATURE_UNICODE_IS_ENABLED) PL_hints |= HINT_UNI_8_BIT;
403 else PL_hints &= ~HINT_UNI_8_BIT;
405 #endif /* PERL_IN_OP_C */
407 #endif /* PERL_FEATURE_H_ */
410 read_only_bottom_close_and_rename($h);
413 ###########################################################################
414 # Template for feature.pm
419 our $VERSION = '1.56';
424 # - think about versioned features (use feature switch => 2)
428 feature - Perl pragma to enable new features
432 use feature qw(say switch);
434 when (1) { say "\$foo == 1" }
435 when ([2,3]) { say "\$foo == 2 || \$foo == 3" }
436 when (/^a[bc]d$/) { say "\$foo eq 'abd' || \$foo eq 'acd'" }
437 when ($_ > 100) { say "\$foo > 100" }
438 default { say "None of the above" }
441 use feature ':5.10'; # loads all features available in perl 5.10
443 use v5.10; # implicitly loads :5.10 feature bundle
447 It is usually impossible to add new syntax to Perl without breaking
448 some existing programs. This pragma provides a way to minimize that
449 risk. New syntactic constructs, or new semantic meanings to older
450 constructs, can be enabled by C<use feature 'foo'>, and will be parsed
451 only when the appropriate feature pragma is in scope. (Nevertheless, the
452 C<CORE::> prefix provides access to all Perl keywords, regardless of this
455 =head2 Lexical effect
457 Like other pragmas (C<use strict>, for example), features have a lexical
458 effect. C<use feature qw(foo)> will only make the feature "foo" available
459 from that point to the end of the enclosing block.
463 say "say is available here";
465 print "But not here.\n";
469 Features can also be turned off by using C<no feature "foo">. This too
473 say "say is available here";
476 print "But not here.\n";
478 say "Yet it is here.";
480 C<no feature> with no features specified will reset to the default group. To
481 disable I<all> features (an unusual request!) use C<no feature ':all'>.
483 =head1 AVAILABLE FEATURES
485 =head2 The 'say' feature
487 C<use feature 'say'> tells the compiler to enable the Perl 6 style
490 See L<perlfunc/say> for details.
492 This feature is available starting with Perl 5.10.
494 =head2 The 'state' feature
496 C<use feature 'state'> tells the compiler to enable C<state>
499 See L<perlsub/"Persistent Private Variables"> for details.
501 This feature is available starting with Perl 5.10.
503 =head2 The 'switch' feature
505 B<WARNING>: Because the L<smartmatch operator|perlop/"Smartmatch Operator"> is
506 experimental, Perl will warn when you use this feature, unless you have
507 explicitly disabled the warning:
509 no warnings "experimental::smartmatch";
511 C<use feature 'switch'> tells the compiler to enable the Perl 6
512 given/when construct.
514 See L<perlsyn/"Switch Statements"> for details.
516 This feature is available starting with Perl 5.10.
518 =head2 The 'unicode_strings' feature
520 C<use feature 'unicode_strings'> tells the compiler to use Unicode rules
521 in all string operations executed within its scope (unless they are also
522 within the scope of either C<use locale> or C<use bytes>). The same applies
523 to all regular expressions compiled within the scope, even if executed outside
524 it. It does not change the internal representation of strings, but only how
525 they are interpreted.
527 C<no feature 'unicode_strings'> tells the compiler to use the traditional
528 Perl rules wherein the native character set rules is used unless it is
529 clear to Perl that Unicode is desired. This can lead to some surprises
530 when the behavior suddenly changes. (See
531 L<perlunicode/The "Unicode Bug"> for details.) For this reason, if you are
532 potentially using Unicode in your program, the
533 C<use feature 'unicode_strings'> subpragma is B<strongly> recommended.
535 This feature is available starting with Perl 5.12; was almost fully
536 implemented in Perl 5.14; and extended in Perl 5.16 to cover C<quotemeta>;
537 was extended further in Perl 5.26 to cover L<the range
538 operator|perlop/Range Operators>; and was extended again in Perl 5.28 to
539 cover L<special-cased whitespace splitting|perlfunc/split>.
541 =head2 The 'unicode_eval' and 'evalbytes' features
543 Together, these two features are intended to replace the legacy string
544 C<eval> function, which behaves problematically in some instances. They are
545 available starting with Perl 5.16, and are enabled by default by a
546 S<C<use 5.16>> or higher declaration.
548 C<unicode_eval> changes the behavior of plain string C<eval> to work more
549 consistently, especially in the Unicode world. Certain (mis)behaviors
550 couldn't be changed without breaking some things that had come to rely on
551 them, so the feature can be enabled and disabled. Details are at
552 L<perlfunc/Under the "unicode_eval" feature>.
554 C<evalbytes> is like string C<eval>, but operating on a byte stream that is
555 not UTF-8 encoded. Details are at L<perlfunc/evalbytes EXPR>. Without a
556 S<C<use feature 'evalbytes'>> nor a S<C<use v5.16>> (or higher) declaration in
557 the current scope, you can still access it by instead writing
560 =head2 The 'current_sub' feature
562 This provides the C<__SUB__> token that returns a reference to the current
563 subroutine or C<undef> outside of a subroutine.
565 This feature is available starting with Perl 5.16.
567 =head2 The 'array_base' feature
569 This feature supported the legacy C<$[> variable. See L<perlvar/$[>.
570 It was on by default but disabled under C<use v5.16> (see
571 L</IMPLICIT LOADING>, below) and unavailable since perl 5.30.
573 This feature is available under this name starting with Perl 5.16. In
574 previous versions, it was simply on all the time, and this pragma knew
577 =head2 The 'fc' feature
579 C<use feature 'fc'> tells the compiler to enable the C<fc> function,
580 which implements Unicode casefolding.
582 See L<perlfunc/fc> for details.
584 This feature is available from Perl 5.16 onwards.
586 =head2 The 'lexical_subs' feature
588 In Perl versions prior to 5.26, this feature enabled
589 declaration of subroutines via C<my sub foo>, C<state sub foo>
590 and C<our sub foo> syntax. See L<perlsub/Lexical Subroutines> for details.
592 This feature is available from Perl 5.18 onwards. From Perl 5.18 to 5.24,
593 it was classed as experimental, and Perl emitted a warning for its
594 usage, except when explicitly disabled:
596 no warnings "experimental::lexical_subs";
598 As of Perl 5.26, use of this feature no longer triggers a warning, though
599 the C<experimental::lexical_subs> warning category still exists (for
600 compatibility with code that disables it). In addition, this syntax is
601 not only no longer experimental, but it is enabled for all Perl code,
602 regardless of what feature declarations are in scope.
604 =head2 The 'postderef' and 'postderef_qq' features
606 The 'postderef_qq' feature extends the applicability of L<postfix
607 dereference syntax|perlref/Postfix Dereference Syntax> so that postfix array
608 and scalar dereference are available in double-quotish interpolations. For
609 example, it makes the following two statements equivalent:
611 my $s = "[@{ $h->{a} }]";
612 my $s = "[$h->{a}->@*]";
614 This feature is available from Perl 5.20 onwards. In Perl 5.20 and 5.22, it
615 was classed as experimental, and Perl emitted a warning for its
616 usage, except when explicitly disabled:
618 no warnings "experimental::postderef";
620 As of Perl 5.24, use of this feature no longer triggers a warning, though
621 the C<experimental::postderef> warning category still exists (for
622 compatibility with code that disables it).
624 The 'postderef' feature was used in Perl 5.20 and Perl 5.22 to enable
625 postfix dereference syntax outside double-quotish interpolations. In those
626 versions, using it triggered the C<experimental::postderef> warning in the
627 same way as the 'postderef_qq' feature did. As of Perl 5.24, this syntax is
628 not only no longer experimental, but it is enabled for all Perl code,
629 regardless of what feature declarations are in scope.
631 =head2 The 'signatures' feature
633 B<WARNING>: This feature is still experimental and the implementation may
634 change in future versions of Perl. For this reason, Perl will
635 warn when you use the feature, unless you have explicitly disabled the
638 no warnings "experimental::signatures";
640 This enables unpacking of subroutine arguments into lexical variables
643 sub foo ($left, $right) {
644 return $left + $right;
647 See L<perlsub/Signatures> for details.
649 This feature is available from Perl 5.20 onwards.
651 =head2 The 'refaliasing' feature
653 B<WARNING>: This feature is still experimental and the implementation may
654 change in future versions of Perl. For this reason, Perl will
655 warn when you use the feature, unless you have explicitly disabled the
658 no warnings "experimental::refaliasing";
660 This enables aliasing via assignment to references:
662 \$a = \$b; # $a and $b now point to the same scalar
663 \@a = \@b; # to the same array
666 foreach \%hash (@array_of_hash_refs) {
670 See L<perlref/Assigning to References> for details.
672 This feature is available from Perl 5.22 onwards.
674 =head2 The 'bitwise' feature
676 This makes the four standard bitwise operators (C<& | ^ ~>) treat their
677 operands consistently as numbers, and introduces four new dotted operators
678 (C<&. |. ^. ~.>) that treat their operands consistently as strings. The
679 same applies to the assignment variants (C<&= |= ^= &.= |.= ^.=>).
681 See L<perlop/Bitwise String Operators> for details.
683 This feature is available from Perl 5.22 onwards. Starting in Perl 5.28,
684 C<use v5.28> will enable the feature. Before 5.28, it was still
685 experimental and would emit a warning in the "experimental::bitwise"
688 =head2 The 'declared_refs' feature
690 B<WARNING>: This feature is still experimental and the implementation may
691 change in future versions of Perl. For this reason, Perl will
692 warn when you use the feature, unless you have explicitly disabled the
695 no warnings "experimental::declared_refs";
697 This allows a reference to a variable to be declared with C<my>, C<state>,
698 our C<our>, or localized with C<local>. It is intended mainly for use in
699 conjunction with the "refaliasing" feature. See L<perlref/Declaring a
700 Reference to a Variable> for examples.
702 This feature is available from Perl 5.26 onwards.
704 =head1 FEATURE BUNDLES
706 It's possible to load multiple features together, using
707 a I<feature bundle>. The name of a feature bundle is prefixed with
708 a colon, to distinguish it from an actual feature.
712 The following feature bundles are available:
714 bundle features included
715 --------- -----------------
717 The C<:default> bundle represents the feature set that is enabled before
718 any C<use feature> or C<no feature> declaration.
720 Specifying sub-versions such as the C<0> in C<5.14.0> in feature bundles has
721 no effect. Feature bundles are guaranteed to be the same for all sub-versions.
723 use feature ":5.14.0"; # same as ":5.14"
724 use feature ":5.14.1"; # same as ":5.14"
726 =head1 IMPLICIT LOADING
728 Instead of loading feature bundles by name, it is easier to let Perl do
729 implicit loading of a feature bundle for you.
731 There are two ways to load the C<feature> pragma implicitly:
737 By using the C<-E> switch on the Perl command-line instead of C<-e>.
738 That will enable the feature bundle for that version of Perl in the
739 main compilation unit (that is, the one-liner that follows C<-E>).
743 By explicitly requiring a minimum Perl version number for your program, with
744 the C<use VERSION> construct. That is,
753 and so on. Note how the trailing sub-version
754 is automatically stripped from the
757 But to avoid portability warnings (see L<perlfunc/use>), you may prefer:
761 with the same effect.
763 If the required version is older than Perl 5.10, the ":default" feature
764 bundle is automatically loaded instead.
766 Unlike C<use feature ":5.12">, saying C<use v5.12> (or any higher version)
767 also does the equivalent of C<use strict>; see L<perlfunc/use> for details.
777 croak("No features specified");
786 # A bare C<no feature> should reset to the default bundle
788 $^H &= ~($hint_uni8bit|$hint_mask);
798 my $bundle_number = $^H & $hint_mask;
799 my $features = $bundle_number != $hint_mask
800 && $feature_bundle{$hint_bundles[$bundle_number >> $hint_shift]};
801 my $bits = ${^FEATURE_BITS};
803 # Features are enabled implicitly via bundle hints.
804 # Delete any keys that may be left over from last time.
805 delete @^H{ values(%feature) };
809 $^H{$feature{$_}} = 1;
810 $bits |= $feature_bits{$_};
811 $^H |= $hint_uni8bit if $_ eq 'unicode_strings';
816 if (substr($name, 0, 1) eq ":") {
817 my $v = substr($name, 1);
818 if (!exists $feature_bundle{$v}) {
819 $v =~ s/^([0-9]+)\.([0-9]+).[0-9]+$/$1.$2/;
820 if (!exists $feature_bundle{$v}) {
821 unknown_feature_bundle(substr($name, 1));
824 unshift @_, @{$feature_bundle{$v}};
827 if (!exists $feature{$name}) {
828 if (exists $noops{$name}) {
831 if (!$import && exists $removed{$name}) {
834 unknown_feature($name);
837 $^H{$feature{$name}} = 1;
838 $bits |= $feature_bits{$name};
839 $^H |= $hint_uni8bit if $name eq 'unicode_strings';
841 delete $^H{$feature{$name}};
842 $bits &= ~$feature_bits{$name};
843 $^H &= ~ $hint_uni8bit if $name eq 'unicode_strings';
846 ${^FEATURE_BITS} = $bits;
849 sub unknown_feature {
851 croak(sprintf('Feature "%s" is not supported by Perl %vd',
855 sub unknown_feature_bundle {
857 croak(sprintf('Feature bundle "%s" is not supported by Perl %vd',