1#!/usr/bin/perl
2#
3# Regenerate (overwriting only if changed):
4#
5#    lib/feature.pm
6#    feature.h
7#
8# from information hardcoded into this script and from two #defines
9# in perl.h.
10#
11# This script is normally invoked from regen.pl.
12
13BEGIN {
14    push @INC, './lib';
15    require './regen/regen_lib.pl';
16    require './regen/HeaderParser.pm';
17}
18
19use strict;
20use warnings;
21
22###########################################################################
23# Hand-editable data
24
25# (feature name) => (internal name, used in %^H and macro names)
26my %feature = (
27    say                     => 'say',
28    state                   => 'state',
29    switch                  => 'switch',
30    bitwise                 => 'bitwise',
31    evalbytes               => 'evalbytes',
32    current_sub             => '__SUB__',
33    refaliasing             => 'refaliasing',
34    postderef_qq            => 'postderef_qq',
35    unicode_eval            => 'unieval',
36    declared_refs           => 'myref',
37    unicode_strings         => 'unicode',
38    fc                      => 'fc',
39    signatures              => 'signatures',
40    isa                     => 'isa',
41    indirect                => 'indirect',
42    multidimensional        => 'multidimensional',
43    bareword_filehandles    => 'bareword_filehandles',
44    try                     => 'try',
45    defer                   => 'defer',
46    extra_paired_delimiters => 'more_delims',
47    module_true             => 'module_true',
48    class                   => 'class',
49);
50
51# NOTE: If a feature is ever enabled in a non-contiguous range of Perl
52#       versions, any code below that uses %BundleRanges will have to
53#       be changed to account.
54
55# 5.odd implies the next 5.even, but an explicit 5.even can override it.
56
57# features bundles
58use constant V5_9_5 => sort qw{say state switch indirect multidimensional bareword_filehandles};
59use constant V5_11  => sort ( +V5_9_5, qw{unicode_strings} );
60use constant V5_15  => sort ( +V5_11, qw{unicode_eval evalbytes current_sub fc} );
61use constant V5_23  => sort ( +V5_15, qw{postderef_qq} );
62use constant V5_27  => sort ( +V5_23, qw{bitwise} );
63
64use constant V5_35  => sort grep {; $_ ne 'switch'
65                                 && $_ ne 'indirect'
66                                 && $_ ne 'multidimensional' } +V5_27, qw{isa signatures};
67
68use constant V5_37  => sort grep {; $_ ne 'bareword_filehandles' } +V5_35, qw{module_true};
69
70#
71# when updating features please also update the Pod entry for L</"FEATURES CHEAT SHEET">
72#
73my %feature_bundle = (
74    all     => [ sort keys %feature ],
75    default => [ qw{indirect multidimensional bareword_filehandles} ],
76    # using 5.9.5 features bundle
77    "5.9.5" => [ +V5_9_5 ],
78    "5.10"  => [ +V5_9_5 ],
79    # using 5.11 features bundle
80    "5.11"  => [ +V5_11 ],
81    "5.13"  => [ +V5_11 ],
82    # using 5.15 features bundle
83    "5.15"  => [ +V5_15 ],
84    "5.17"  => [ +V5_15 ],
85    "5.19"  => [ +V5_15 ],
86    "5.21"  => [ +V5_15 ],
87    # using 5.23 features bundle
88    "5.23"  => [ +V5_23 ],
89    "5.25"  => [ +V5_23 ],
90    # using 5.27 features bundle
91    "5.27"  => [ +V5_27 ],
92    "5.29"  => [ +V5_27 ],
93    "5.31"  => [ +V5_27 ],
94    "5.33"  => [ +V5_27 ],
95    # using 5.35 features bundle
96    "5.35"  => [ +V5_35 ],
97    # using 5.37 features bundle
98    "5.37"  => [ +V5_37 ],
99);
100
101my @noops = qw( postderef lexical_subs );
102my @removed = qw( array_base );
103
104
105###########################################################################
106# More data generated from the above
107
108if (keys %feature > 32) {
109    die "cop_features only has room for 32 features";
110}
111
112my %feature_bits;
113my $mask = 1;
114for my $feature (sort keys %feature) {
115    $feature_bits{$feature} = $mask;
116    $mask <<= 1;
117}
118
119for (keys %feature_bundle) {
120    next unless /^5\.(\d*[13579])\z/;
121    $feature_bundle{"5.".($1+1)} ||= $feature_bundle{$_};
122}
123
124my %UniqueBundles; # "say state switch" => 5.10
125my %Aliases;       #  5.12 => 5.11
126for( sort keys %feature_bundle ) {
127    my $value = join(' ', sort @{$feature_bundle{$_}});
128    if (exists $UniqueBundles{$value}) {
129	$Aliases{$_} = $UniqueBundles{$value};
130    }
131    else {
132	$UniqueBundles{$value} = $_;
133    }
134}
135			   # start   end
136my %BundleRanges; # say => ['5.10', '5.15'] # unique bundles for values
137for my $bund (
138    sort { $a eq 'default' ? -1 : $b eq 'default' ? 1 : $a cmp $b }
139         values %UniqueBundles
140) {
141    next if $bund =~ /[^\d.]/ and $bund ne 'default';
142    for (@{$feature_bundle{$bund}}) {
143	if (@{$BundleRanges{$_} ||= []} == 2) {
144	    $BundleRanges{$_}[1] = $bund
145	}
146	else {
147	    push @{$BundleRanges{$_}}, $bund;
148	}
149    }
150}
151
152my $HintShift;
153my $HintMask;
154my $Uni8Bit;
155my $hp = HeaderParser->new()->read_file("perl.h");
156
157foreach my $line_data (@{$hp->lines}) {
158    next unless $line_data->{type} eq "content"
159            and $line_data->{sub_type} eq "#define";
160    my $line = $line_data->{line};
161    next unless $line=~/^\s*#\s*define\s+(HINT_FEATURE_MASK|HINT_UNI_8_BIT)/;
162    my $is_u8b = $1 =~ 8;
163    $line=~/(0x[A-Fa-f0-9]+)/ or die "No hex number in:\n\n$line\n ";
164    if ($is_u8b) {
165	$Uni8Bit = $1;
166    }
167    else {
168	my $hex = $HintMask = $1;
169	my $bits = sprintf "%b", oct $1;
170	$bits =~ /^0*1+(0*)\z/
171         or die "Non-contiguous bits in $bits (binary for $hex):\n\n$line\n ";
172	$HintShift = length $1;
173	my $bits_needed =
174	    length sprintf "%b", scalar keys %UniqueBundles;
175	$bits =~ /1{$bits_needed}/
176	    or die "Not enough bits (need $bits_needed)"
177                 . " in $bits (binary for $hex):\n\n$line\n ";
178    }
179    if ($Uni8Bit && $HintMask) { last }
180}
181die "No HINT_FEATURE_MASK defined in perl.h" unless $HintMask;
182die "No HINT_UNI_8_BIT defined in perl.h"    unless $Uni8Bit;
183
184my @HintedBundles =
185    ('default', grep !/[^\d.]/, sort values %UniqueBundles);
186
187
188###########################################################################
189# Open files to be generated
190
191my ($pm, $h) = map {
192    open_new($_, '>', { by => 'regen/feature.pl' });
193} 'lib/feature.pm', 'feature.h';
194
195
196###########################################################################
197# Generate lib/feature.pm
198
199while (<DATA>) {
200    last if /^FEATURES$/ ;
201    print $pm $_ ;
202}
203
204sub longest {
205    my $long;
206    for(@_) {
207	if (!defined $long or length $long < length) {
208	    $long = $_;
209	}
210    }
211    $long;
212}
213
214print $pm "our %feature = (\n";
215my $width = length longest keys %feature;
216for(sort { length $a <=> length $b || $a cmp $b } keys %feature) {
217    print $pm "    $_" . " "x($width-length)
218	    . " => 'feature_$feature{$_}',\n";
219}
220print $pm ");\n\n";
221
222print $pm "our %feature_bundle = (\n";
223my $bund_width = length longest values %UniqueBundles;
224for( sort { $UniqueBundles{$a} cmp $UniqueBundles{$b} }
225          keys %UniqueBundles ) {
226    my $bund = $UniqueBundles{$_};
227    print $pm qq'    "$bund"' . " "x($bund_width-length $bund)
228	    . qq' => [qw($_)],\n';
229}
230print $pm ");\n\n";
231
232for (sort keys %Aliases) {
233    print $pm
234	qq'\$feature_bundle{"$_"} = \$feature_bundle{"$Aliases{$_}"};\n';
235};
236
237print $pm "my \%noops = (\n";
238print $pm "    $_ => 1,\n", for @noops;
239print $pm ");\n";
240
241print $pm "my \%removed = (\n";
242print $pm "    $_ => 1,\n", for @removed;
243print $pm ");\n";
244
245print $pm <<EOPM;
246
247our \$hint_shift   = $HintShift;
248our \$hint_mask    = $HintMask;
249our \@hint_bundles = qw( @HintedBundles );
250
251# This gets set (for now) in \$^H as well as in %^H,
252# for runtime speed of the uc/lc/ucfirst/lcfirst functions.
253# See HINT_UNI_8_BIT in perl.h.
254our \$hint_uni8bit = $Uni8Bit;
255EOPM
256
257
258while (<DATA>) {
259    last if /^PODTURES$/ ;
260    print $pm $_ ;
261}
262
263select +(select($pm), $~ = 'PODTURES')[0];
264format PODTURES =
265  ^<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
266$::bundle, $::feature
267.
268
269for ('default', sort grep /\.\d[02468]/, keys %feature_bundle) {
270    $::bundle = ":$_";
271    $::feature = join ' ', @{$feature_bundle{$_}};
272    write $pm;
273    print $pm "\n";
274}
275
276while (<DATA>) {
277    print $pm $_ ;
278}
279
280read_only_bottom_close_and_rename($pm);
281
282
283###########################################################################
284# Generate feature.h
285
286print $h <<EOH;
287
288#ifndef PERL_FEATURE_H_
289#define PERL_FEATURE_H_
290
291#if defined(PERL_CORE) || defined (PERL_EXT)
292
293#define HINT_FEATURE_SHIFT	$HintShift
294
295EOH
296
297for (sort keys %feature_bits) {
298    printf $h "#define FEATURE_%s_BIT%*s %#06x\n", uc($feature{$_}),
299      $width-length($feature{$_}), "", $feature_bits{$_};
300}
301print $h "\n";
302
303my $count;
304for (@HintedBundles) {
305    (my $key = uc) =~ y/.//d;
306    print $h "#define FEATURE_BUNDLE_$key	", $count++, "\n";
307}
308
309print $h <<'EOH';
310#define FEATURE_BUNDLE_CUSTOM	(HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
311
312/* this is preserved for testing and asserts */
313#define OLD_CURRENT_HINTS \
314    (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints)
315/* this is the same thing, but simpler (no if) as PL_hints expands
316   to PL_compiling.cop_hints */
317#define CURRENT_HINTS \
318    PL_curcop->cop_hints
319#define CURRENT_FEATURE_BUNDLE \
320    ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
321
322#define FEATURE_IS_ENABLED_MASK(mask)                   \
323  ((CURRENT_HINTS & HINT_LOCALIZE_HH)                \
324    ? (PL_curcop->cop_features & (mask)) : FALSE)
325
326/* The longest string we pass in.  */
327EOH
328
329my $longest_internal_feature_name = longest values %feature;
330print $h <<EOL;
331#define MAX_FEATURE_LEN (sizeof("$longest_internal_feature_name")-1)
332
333EOL
334
335for (
336    sort { length $a <=> length $b || $a cmp $b } keys %feature
337) {
338    my($first,$last) =
339	map { (my $__ = uc) =~ y/.//d; $__ } @{$BundleRanges{$_}};
340    my $name = $feature{$_};
341    my $NAME = uc $name;
342    if ($last && $first eq 'DEFAULT') { #  '>= DEFAULT' warns
343	print $h <<EOI;
344#define FEATURE_${NAME}_IS_ENABLED \\
345    ( \\
346	CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last \\
347     || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
348	 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
349    )
350
351EOI
352    }
353    elsif ($last) {
354	print $h <<EOH3;
355#define FEATURE_${NAME}_IS_ENABLED \\
356    ( \\
357	(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_$first && \\
358	 CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_$last) \\
359     || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
360	 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
361    )
362
363EOH3
364    }
365    elsif ($first) {
366	print $h <<EOH4;
367#define FEATURE_${NAME}_IS_ENABLED \\
368    ( \\
369	CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_$first \\
370     || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
371	 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT)) \\
372    )
373
374EOH4
375    }
376    else {
377	print $h <<EOH5;
378#define FEATURE_${NAME}_IS_ENABLED \\
379    ( \\
380	CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \\
381	 FEATURE_IS_ENABLED_MASK(FEATURE_${NAME}_BIT) \\
382    )
383
384EOH5
385    }
386}
387
388print $h <<EOH;
389
390#define SAVEFEATUREBITS() SAVEI32(PL_compiling.cop_features)
391
392#define CLEARFEATUREBITS() (PL_compiling.cop_features = 0)
393
394#define STOREFEATUREBITSHH(hh) \\
395  (hv_stores((hh), "feature/bits", newSVuv(PL_compiling.cop_features)))
396
397#define FETCHFEATUREBITSHH(hh)                              \\
398  STMT_START {                                              \\
399      SV **fbsv = hv_fetchs((hh), "feature/bits", FALSE);   \\
400      PL_compiling.cop_features = fbsv ? SvUV(*fbsv) : 0;   \\
401  } STMT_END
402
403#endif /* PERL_CORE or PERL_EXT */
404
405#ifdef PERL_IN_OP_C
406PERL_STATIC_INLINE void
407S_enable_feature_bundle(pTHX_ SV *ver)
408{
409    SV *comp_ver = sv_newmortal();
410    PL_hints = (PL_hints &~ HINT_FEATURE_MASK)
411	     | (
412EOH
413
414for (reverse @HintedBundles[1..$#HintedBundles]) { # skip default
415    my $numver = $_;
416    if ($numver eq '5.10') { $numver = '5.009005' } # special case
417    else		   { $numver =~ s/\./.0/  } # 5.11 => 5.011
418    (my $macrover = $_) =~ y/.//d;
419    print $h <<"    EOK";
420		  (sv_setnv(comp_ver, $numver),
421		   vcmp(ver, upg_version(comp_ver, FALSE)) >= 0)
422			? FEATURE_BUNDLE_$macrover :
423    EOK
424}
425
426print $h <<EOJ;
427			  FEATURE_BUNDLE_DEFAULT
428	       ) << HINT_FEATURE_SHIFT;
429    /* special case */
430    assert(PL_curcop == &PL_compiling);
431    if (FEATURE_UNICODE_IS_ENABLED) PL_hints |=  HINT_UNI_8_BIT;
432    else			    PL_hints &= ~HINT_UNI_8_BIT;
433}
434#endif /* PERL_IN_OP_C */
435
436#ifdef PERL_IN_MG_C
437
438#define magic_sethint_feature(keysv, keypv, keylen, valsv, valbool) \\
439    S_magic_sethint_feature(aTHX_ (keysv), (keypv), (keylen), (valsv), (valbool))
440PERL_STATIC_INLINE void
441S_magic_sethint_feature(pTHX_ SV *keysv, const char *keypv, STRLEN keylen,
442                        SV *valsv, bool valbool) {
443    if (keysv)
444      keypv = SvPV_const(keysv, keylen);
445
446    if (memBEGINs(keypv, keylen, "feature_")) {
447        const char *subf = keypv + (sizeof("feature_")-1);
448        U32 mask = 0;
449        switch (*subf) {
450EOJ
451
452my %pref;
453for my $key (sort values %feature) {
454    push @{$pref{substr($key, 0, 1)}}, $key;
455}
456
457for my $pref (sort keys %pref) {
458    print $h <<EOS;
459        case '$pref':
460EOS
461    my $first = 1;
462    for my $subkey (@{$pref{$pref}}) {
463        my $rest = substr($subkey, 1);
464        my $if = $first ? "if" : "else if";
465        print $h <<EOJ;
466            $if (keylen == sizeof("feature_$subkey")-1
467                 && memcmp(subf+1, "$rest", keylen - sizeof("feature_")) == 0) {
468                mask = FEATURE_\U${subkey}\E_BIT;
469                break;
470            }
471EOJ
472
473        $first = 0;
474    }
475    print $h <<EOS;
476            return;
477
478EOS
479}
480
481print $h <<EOJ;
482        default:
483            return;
484        }
485        if (valsv ? SvTRUE(valsv) : valbool)
486            PL_compiling.cop_features |= mask;
487        else
488            PL_compiling.cop_features &= ~mask;
489    }
490}
491#endif /* PERL_IN_MG_C */
492
493#endif /* PERL_FEATURE_H_ */
494EOJ
495
496read_only_bottom_close_and_rename($h);
497
498
499###########################################################################
500# Template for feature.pm
501
502__END__
503package feature;
504our $VERSION = '1.82';
505
506FEATURES
507
508# TODO:
509# - think about versioned features (use feature switch => 2)
510
511=encoding utf8
512
513=head1 NAME
514
515feature - Perl pragma to enable new features
516
517=head1 SYNOPSIS
518
519    use feature qw(fc say);
520
521    # Without the "use feature" above, this code would not be able to find
522    # the built-ins "say" or "fc":
523    say "The case-folded version of $x is: " . fc $x;
524
525
526    # set features to match the :5.36 bundle, which may turn off or on
527    # multiple features (see "FEATURE BUNDLES" below)
528    use feature ':5.36';
529
530
531    # implicitly loads :5.36 feature bundle
532    use v5.36;
533
534=head1 DESCRIPTION
535
536It is usually impossible to add new syntax to Perl without breaking
537some existing programs.  This pragma provides a way to minimize that
538risk. New syntactic constructs, or new semantic meanings to older
539constructs, can be enabled by C<use feature 'foo'>, and will be parsed
540only when the appropriate feature pragma is in scope.  (Nevertheless, the
541C<CORE::> prefix provides access to all Perl keywords, regardless of this
542pragma.)
543
544=head2 Lexical effect
545
546Like other pragmas (C<use strict>, for example), features have a lexical
547effect.  C<use feature qw(foo)> will only make the feature "foo" available
548from that point to the end of the enclosing block.
549
550    {
551        use feature 'say';
552        say "say is available here";
553    }
554    print "But not here.\n";
555
556=head2 C<no feature>
557
558Features can also be turned off by using C<no feature "foo">.  This too
559has lexical effect.
560
561    use feature 'say';
562    say "say is available here";
563    {
564        no feature 'say';
565        print "But not here.\n";
566    }
567    say "Yet it is here.";
568
569C<no feature> with no features specified will reset to the default group.  To
570disable I<all> features (an unusual request!) use C<no feature ':all'>.
571
572=head1 AVAILABLE FEATURES
573
574Read L</"FEATURE BUNDLES"> for the feature cheat sheet summary.
575
576=head2 The 'say' feature
577
578C<use feature 'say'> tells the compiler to enable the Raku-inspired
579C<say> function.
580
581See L<perlfunc/say> for details.
582
583This feature is available starting with Perl 5.10.
584
585=head2 The 'state' feature
586
587C<use feature 'state'> tells the compiler to enable C<state>
588variables.
589
590See L<perlsub/"Persistent Private Variables"> for details.
591
592This feature is available starting with Perl 5.10.
593
594=head2 The 'switch' feature
595
596B<WARNING>: This feature is still experimental and the implementation may
597change or be removed in future versions of Perl.  For this reason, Perl will
598warn when you use the feature, unless you have explicitly disabled the warning:
599
600    no warnings "experimental::smartmatch";
601
602C<use feature 'switch'> tells the compiler to enable the Raku
603given/when construct.
604
605See L<perlsyn/"Switch Statements"> for details.
606
607This feature is available starting with Perl 5.10.
608It is deprecated starting with Perl 5.38, and using
609C<given>, C<when> or smartmatch will throw a warning.
610It will be removed in Perl 5.42.
611
612=head2 The 'unicode_strings' feature
613
614C<use feature 'unicode_strings'> tells the compiler to use Unicode rules
615in all string operations executed within its scope (unless they are also
616within the scope of either C<use locale> or C<use bytes>).  The same applies
617to all regular expressions compiled within the scope, even if executed outside
618it.  It does not change the internal representation of strings, but only how
619they are interpreted.
620
621C<no feature 'unicode_strings'> tells the compiler to use the traditional
622Perl rules wherein the native character set rules is used unless it is
623clear to Perl that Unicode is desired.  This can lead to some surprises
624when the behavior suddenly changes.  (See
625L<perlunicode/The "Unicode Bug"> for details.)  For this reason, if you are
626potentially using Unicode in your program, the
627C<use feature 'unicode_strings'> subpragma is B<strongly> recommended.
628
629This feature is available starting with Perl 5.12; was almost fully
630implemented in Perl 5.14; and extended in Perl 5.16 to cover C<quotemeta>;
631was extended further in Perl 5.26 to cover L<the range
632operator|perlop/Range Operators>; and was extended again in Perl 5.28 to
633cover L<special-cased whitespace splitting|perlfunc/split>.
634
635=head2 The 'unicode_eval' and 'evalbytes' features
636
637Together, these two features are intended to replace the legacy string
638C<eval> function, which behaves problematically in some instances.  They are
639available starting with Perl 5.16, and are enabled by default by a
640S<C<use 5.16>> or higher declaration.
641
642C<unicode_eval> changes the behavior of plain string C<eval> to work more
643consistently, especially in the Unicode world.  Certain (mis)behaviors
644couldn't be changed without breaking some things that had come to rely on
645them, so the feature can be enabled and disabled.  Details are at
646L<perlfunc/Under the "unicode_eval" feature>.
647
648C<evalbytes> is like string C<eval>, but it treats its argument as a byte
649string. Details are at L<perlfunc/evalbytes EXPR>.  Without a
650S<C<use feature 'evalbytes'>> nor a S<C<use v5.16>> (or higher) declaration in
651the current scope, you can still access it by instead writing
652C<CORE::evalbytes>.
653
654=head2 The 'current_sub' feature
655
656This provides the C<__SUB__> token that returns a reference to the current
657subroutine or C<undef> outside of a subroutine.
658
659This feature is available starting with Perl 5.16.
660
661=head2 The 'array_base' feature
662
663This feature supported the legacy C<$[> variable.  See L<perlvar/$[>.
664It was on by default but disabled under C<use v5.16> (see
665L</IMPLICIT LOADING>, below) and unavailable since perl 5.30.
666
667This feature is available under this name starting with Perl 5.16.  In
668previous versions, it was simply on all the time, and this pragma knew
669nothing about it.
670
671=head2 The 'fc' feature
672
673C<use feature 'fc'> tells the compiler to enable the C<fc> function,
674which implements Unicode casefolding.
675
676See L<perlfunc/fc> for details.
677
678This feature is available from Perl 5.16 onwards.
679
680=head2 The 'lexical_subs' feature
681
682In Perl versions prior to 5.26, this feature enabled
683declaration of subroutines via C<my sub foo>, C<state sub foo>
684and C<our sub foo> syntax.  See L<perlsub/Lexical Subroutines> for details.
685
686This feature is available from Perl 5.18 onwards.  From Perl 5.18 to 5.24,
687it was classed as experimental, and Perl emitted a warning for its
688usage, except when explicitly disabled:
689
690  no warnings "experimental::lexical_subs";
691
692As of Perl 5.26, use of this feature no longer triggers a warning, though
693the C<experimental::lexical_subs> warning category still exists (for
694compatibility with code that disables it).  In addition, this syntax is
695not only no longer experimental, but it is enabled for all Perl code,
696regardless of what feature declarations are in scope.
697
698=head2 The 'postderef' and 'postderef_qq' features
699
700The 'postderef_qq' feature extends the applicability of L<postfix
701dereference syntax|perlref/Postfix Dereference Syntax> so that
702postfix array dereference, postfix scalar dereference, and
703postfix array highest index access are available in double-quotish interpolations.
704For example, it makes the following two statements equivalent:
705
706  my $s = "[@{ $h->{a} }]";
707  my $s = "[$h->{a}->@*]";
708
709This feature is available from Perl 5.20 onwards. In Perl 5.20 and 5.22, it
710was classed as experimental, and Perl emitted a warning for its
711usage, except when explicitly disabled:
712
713  no warnings "experimental::postderef";
714
715As of Perl 5.24, use of this feature no longer triggers a warning, though
716the C<experimental::postderef> warning category still exists (for
717compatibility with code that disables it).
718
719The 'postderef' feature was used in Perl 5.20 and Perl 5.22 to enable
720postfix dereference syntax outside double-quotish interpolations. In those
721versions, using it triggered the C<experimental::postderef> warning in the
722same way as the 'postderef_qq' feature did. As of Perl 5.24, this syntax is
723not only no longer experimental, but it is enabled for all Perl code,
724regardless of what feature declarations are in scope.
725
726=head2 The 'signatures' feature
727
728This enables syntax for declaring subroutine arguments as lexical variables.
729For example, for this subroutine:
730
731    sub foo ($left, $right) {
732        return $left + $right;
733    }
734
735Calling C<foo(3, 7)> will assign C<3> into C<$left> and C<7> into C<$right>.
736
737See L<perlsub/Signatures> for details.
738
739This feature is available from Perl 5.20 onwards. From Perl 5.20 to 5.34,
740it was classed as experimental, and Perl emitted a warning for its usage,
741except when explicitly disabled:
742
743  no warnings "experimental::signatures";
744
745As of Perl 5.36, use of this feature no longer triggers a warning, though the
746C<experimental::signatures> warning category still exists (for compatibility
747with code that disables it). This feature is now considered stable, and is
748enabled automatically by C<use v5.36> (or higher).
749
750=head2 The 'refaliasing' feature
751
752B<WARNING>: This feature is still experimental and the implementation may
753change or be removed in future versions of Perl.  For this reason, Perl will
754warn when you use the feature, unless you have explicitly disabled the warning:
755
756    no warnings "experimental::refaliasing";
757
758This enables aliasing via assignment to references:
759
760    \$a = \$b; # $a and $b now point to the same scalar
761    \@a = \@b; #                     to the same array
762    \%a = \%b;
763    \&a = \&b;
764    foreach \%hash (@array_of_hash_refs) {
765        ...
766    }
767
768See L<perlref/Assigning to References> for details.
769
770This feature is available from Perl 5.22 onwards.
771
772=head2 The 'bitwise' feature
773
774This makes the four standard bitwise operators (C<& | ^ ~>) treat their
775operands consistently as numbers, and introduces four new dotted operators
776(C<&. |. ^. ~.>) that treat their operands consistently as strings.  The
777same applies to the assignment variants (C<&= |= ^= &.= |.= ^.=>).
778
779See L<perlop/Bitwise String Operators> for details.
780
781This feature is available from Perl 5.22 onwards.  Starting in Perl 5.28,
782C<use v5.28> will enable the feature.  Before 5.28, it was still
783experimental and would emit a warning in the "experimental::bitwise"
784category.
785
786=head2 The 'declared_refs' feature
787
788B<WARNING>: This feature is still experimental and the implementation may
789change or be removed in future versions of Perl.  For this reason, Perl will
790warn when you use the feature, unless you have explicitly disabled the warning:
791
792    no warnings "experimental::declared_refs";
793
794This allows a reference to a variable to be declared with C<my>, C<state>,
795or C<our>, or localized with C<local>.  It is intended mainly for use in
796conjunction with the "refaliasing" feature.  See L<perlref/Declaring a
797Reference to a Variable> for examples.
798
799This feature is available from Perl 5.26 onwards.
800
801=head2 The 'isa' feature
802
803This allows the use of the C<isa> infix operator, which tests whether the
804scalar given by the left operand is an object of the class given by the
805right operand. See L<perlop/Class Instance Operator> for more details.
806
807This feature is available from Perl 5.32 onwards.  From Perl 5.32 to 5.34,
808it was classed as experimental, and Perl emitted a warning for its usage,
809except when explicitly disabled:
810
811    no warnings "experimental::isa";
812
813As of Perl 5.36, use of this feature no longer triggers a warning (though the
814C<experimental::isa> warning category stilll exists for compatibility with
815code that disables it). This feature is now considered stable, and is enabled
816automatically by C<use v5.36> (or higher).
817
818=head2 The 'indirect' feature
819
820This feature allows the use of L<indirect object
821syntax|perlobj/Indirect Object Syntax> for method calls, e.g.  C<new
822Foo 1, 2;>. It is enabled by default, but can be turned off to
823disallow indirect object syntax.
824
825This feature is available under this name from Perl 5.32 onwards. In
826previous versions, it was simply on all the time.  To disallow (or
827warn on) indirect object syntax on older Perls, see the L<indirect>
828CPAN module.
829
830=head2 The 'multidimensional' feature
831
832This feature enables multidimensional array emulation, a perl 4 (or
833earlier) feature that was used to emulate multidimensional arrays with
834hashes.  This works by converting code like C<< $foo{$x, $y} >> into
835C<< $foo{join($;, $x, $y)} >>.  It is enabled by default, but can be
836turned off to disable multidimensional array emulation.
837
838When this feature is disabled the syntax that is normally replaced
839will report a compilation error.
840
841This feature is available under this name from Perl 5.34 onwards. In
842previous versions, it was simply on all the time.
843
844You can use the L<multidimensional> module on CPAN to disable
845multidimensional array emulation for older versions of Perl.
846
847=head2 The 'bareword_filehandles' feature
848
849This feature enables bareword filehandles for builtin functions
850operations, a generally discouraged practice.  It is enabled by
851default, but can be turned off to disable bareword filehandles, except
852for the exceptions listed below.
853
854The perl built-in filehandles C<STDIN>, C<STDOUT>, C<STDERR>, C<DATA>,
855C<ARGV>, C<ARGVOUT> and the special C<_> are always enabled.
856
857This feature is enabled under this name from Perl 5.34 onwards.  In
858previous versions it was simply on all the time.
859
860You can use the L<bareword::filehandles> module on CPAN to disable
861bareword filehandles for older versions of perl.
862
863=head2 The 'try' feature
864
865B<WARNING>: This feature is still experimental and the implementation may
866change or be removed in future versions of Perl.  For this reason, Perl will
867warn when you use the feature, unless you have explicitly disabled the warning:
868
869    no warnings "experimental::try";
870
871This feature enables the C<try> and C<catch> syntax, which allows exception
872handling, where exceptions thrown from the body of the block introduced with
873C<try> are caught by executing the body of the C<catch> block.
874
875For more information, see L<perlsyn/"Try Catch Exception Handling">.
876
877=head2 The 'defer' feature
878
879B<WARNING>: This feature is still experimental and the implementation may
880change or be removed in future versions of Perl.  For this reason, Perl will
881warn when you use the feature, unless you have explicitly disabled the warning:
882
883    no warnings "experimental::defer";
884
885This feature enables the C<defer> block syntax, which allows a block of code
886to be deferred until when the flow of control leaves the block which contained
887it. For more details, see L<perlsyn/defer>.
888
889=head2 The 'extra_paired_delimiters' feature
890
891B<WARNING>: This feature is still experimental and the implementation may
892change or be removed in future versions of Perl.  For this reason, Perl will
893warn when you use the feature, unless you have explicitly disabled the warning:
894
895    no warnings "experimental::extra_paired_delimiters";
896
897This feature enables the use of more paired string delimiters than the
898traditional four, S<C<< <  > >>>, S<C<( )>>, S<C<{ }>>, and S<C<[ ]>>.  When
899this feature is on, for example, you can say S<C<qrE<171>patE<187>>>.
900
901As with any usage of non-ASCII delimiters in a UTF-8-encoded source file, you
902will want to ensure the parser will decode the source code from UTF-8 bytes
903with a declaration such as C<use utf8>.
904
905This feature is available starting in Perl 5.36.
906
907The complete list of accepted paired delimiters as of Unicode 14.0 is:
908
909 (  )    U+0028, U+0029   LEFT/RIGHT PARENTHESIS
910 <  >    U+003C, U+003E   LESS-THAN/GREATER-THAN SIGN
911 [  ]    U+005B, U+005D   LEFT/RIGHT SQUARE BRACKET
912 {  }    U+007B, U+007D   LEFT/RIGHT CURLY BRACKET
913 ��  ��    U+00AB, U+00BB   LEFT/RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
914 ��  ��    U+00BB, U+00AB   RIGHT/LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
915 ��  ��    U+0706, U+0707   SYRIAC COLON SKEWED LEFT/RIGHT
916 ���  ���    U+0F3A, U+0F3B   TIBETAN MARK GUG RTAGS GYON,  TIBETAN MARK GUG
917                          RTAGS GYAS
918 ���  ���    U+0F3C, U+0F3D   TIBETAN MARK ANG KHANG GYON,  TIBETAN MARK ANG
919                          KHANG GYAS
920 ���  ���    U+169B, U+169C   OGHAM FEATHER MARK,  OGHAM REVERSED FEATHER MARK
921 ���  ���    U+2018, U+2019   LEFT/RIGHT SINGLE QUOTATION MARK
922 ���  ���    U+2019, U+2018   RIGHT/LEFT SINGLE QUOTATION MARK
923 ���  ���    U+201C, U+201D   LEFT/RIGHT DOUBLE QUOTATION MARK
924 ���  ���    U+201D, U+201C   RIGHT/LEFT DOUBLE QUOTATION MARK
925 ���  ���    U+2035, U+2032   REVERSED PRIME,  PRIME
926 ���  ���    U+2036, U+2033   REVERSED DOUBLE PRIME,  DOUBLE PRIME
927 ���  ���    U+2037, U+2034   REVERSED TRIPLE PRIME,  TRIPLE PRIME
928 ���  ���    U+2039, U+203A   SINGLE LEFT/RIGHT-POINTING ANGLE QUOTATION MARK
929 ���  ���    U+203A, U+2039   SINGLE RIGHT/LEFT-POINTING ANGLE QUOTATION MARK
930 ���  ���    U+2045, U+2046   LEFT/RIGHT SQUARE BRACKET WITH QUILL
931 ���  ���    U+204D, U+204C   BLACK RIGHT/LEFTWARDS BULLET
932 ���  ���    U+207D, U+207E   SUPERSCRIPT LEFT/RIGHT PARENTHESIS
933 ���  ���    U+208D, U+208E   SUBSCRIPT LEFT/RIGHT PARENTHESIS
934 ���  ���    U+2192, U+2190   RIGHT/LEFTWARDS ARROW
935 ���  ���    U+219B, U+219A   RIGHT/LEFTWARDS ARROW WITH STROKE
936 ���  ���    U+219D, U+219C   RIGHT/LEFTWARDS WAVE ARROW
937 ���  ���    U+21A0, U+219E   RIGHT/LEFTWARDS TWO HEADED ARROW
938 ���  ���    U+21A3, U+21A2   RIGHT/LEFTWARDS ARROW WITH TAIL
939 ���  ���    U+21A6, U+21A4   RIGHT/LEFTWARDS ARROW FROM BAR
940 ���  ���    U+21AA, U+21A9   RIGHT/LEFTWARDS ARROW WITH HOOK
941 ���  ���    U+21AC, U+21AB   RIGHT/LEFTWARDS ARROW WITH LOOP
942 ���  ���    U+21B1, U+21B0   UPWARDS ARROW WITH TIP RIGHT/LEFTWARDS
943 ���  ���    U+21B3, U+21B2   DOWNWARDS ARROW WITH TIP RIGHT/LEFTWARDS
944 ���  ���    U+21C0, U+21BC   RIGHT/LEFTWARDS HARPOON WITH BARB UPWARDS
945 ���  ���    U+21C1, U+21BD   RIGHT/LEFTWARDS HARPOON WITH BARB DOWNWARDS
946 ���  ���    U+21C9, U+21C7   RIGHT/LEFTWARDS PAIRED ARROWS
947 ���  ���    U+21CF, U+21CD   RIGHT/LEFTWARDS DOUBLE ARROW WITH STROKE
948 ���  ���    U+21D2, U+21D0   RIGHT/LEFTWARDS DOUBLE ARROW
949 ���  ���    U+21DB, U+21DA   RIGHT/LEFTWARDS TRIPLE ARROW
950 ���  ���    U+21DD, U+21DC   RIGHT/LEFTWARDS SQUIGGLE ARROW
951 ���  ���    U+21E2, U+21E0   RIGHT/LEFTWARDS DASHED ARROW
952 ���  ���    U+21E5, U+21E4   RIGHT/LEFTWARDS ARROW TO BAR
953 ���  ���    U+21E8, U+21E6   RIGHT/LEFTWARDS WHITE ARROW
954 ���  ���    U+21F4, U+2B30   RIGHT/LEFT ARROW WITH SMALL CIRCLE
955 ���  ���    U+21F6, U+2B31   THREE RIGHT/LEFTWARDS ARROWS
956 ���  ���    U+21F8, U+21F7   RIGHT/LEFTWARDS ARROW WITH VERTICAL STROKE
957 ���  ���    U+21FB, U+21FA   RIGHT/LEFTWARDS ARROW WITH DOUBLE VERTICAL
958                          STROKE
959 ���  ���    U+21FE, U+21FD   RIGHT/LEFTWARDS OPEN-HEADED ARROW
960 ���  ���    U+2208, U+220B   ELEMENT OF,  CONTAINS AS MEMBER
961 ���  ���    U+2209, U+220C   NOT AN ELEMENT OF,  DOES NOT CONTAIN AS MEMBER
962 ���  ���    U+220A, U+220D   SMALL ELEMENT OF,  SMALL CONTAINS AS MEMBER
963 ���  ���    U+2264, U+2265   LESS-THAN/GREATER-THAN OR EQUAL TO
964 ���  ���    U+2266, U+2267   LESS-THAN/GREATER-THAN OVER EQUAL TO
965 ���  ���    U+2268, U+2269   LESS-THAN/GREATER-THAN BUT NOT EQUAL TO
966 ���  ���    U+226A, U+226B   MUCH LESS-THAN/GREATER-THAN
967 ���  ���    U+226E, U+226F   NOT LESS-THAN/GREATER-THAN
968 ���  ���    U+2270, U+2271   NEITHER LESS-THAN/GREATER-THAN NOR EQUAL TO
969 ���  ���    U+2272, U+2273   LESS-THAN/GREATER-THAN OR EQUIVALENT TO
970 ���  ���    U+2274, U+2275   NEITHER LESS-THAN/GREATER-THAN NOR EQUIVALENT TO
971 ���  ���    U+227A, U+227B   PRECEDES/SUCCEEDS
972 ���  ���    U+227C, U+227D   PRECEDES/SUCCEEDS OR EQUAL TO
973 ���  ���    U+227E, U+227F   PRECEDES/SUCCEEDS OR EQUIVALENT TO
974 ���  ���    U+2280, U+2281   DOES NOT PRECEDE/SUCCEED
975 ���  ���    U+2282, U+2283   SUBSET/SUPERSET OF
976 ���  ���    U+2284, U+2285   NOT A SUBSET/SUPERSET OF
977 ���  ���    U+2286, U+2287   SUBSET/SUPERSET OF OR EQUAL TO
978 ���  ���    U+2288, U+2289   NEITHER A SUBSET/SUPERSET OF NOR EQUAL TO
979 ���  ���    U+228A, U+228B   SUBSET/SUPERSET OF WITH NOT EQUAL TO
980 ���  ���    U+22A3, U+22A2   LEFT/RIGHT TACK
981 ���  ���    U+22A6, U+2ADE   ASSERTION,  SHORT LEFT TACK
982 ���  ���    U+22A8, U+2AE4   TRUE,  VERTICAL BAR DOUBLE LEFT TURNSTILE
983 ���  ���    U+22A9, U+2AE3   FORCES,  DOUBLE VERTICAL BAR LEFT TURNSTILE
984 ���  ���    U+22B0, U+22B1   PRECEDES/SUCCEEDS UNDER RELATION
985 ���  ���    U+22D0, U+22D1   DOUBLE SUBSET/SUPERSET
986 ���  ���    U+22D6, U+22D7   LESS-THAN/GREATER-THAN WITH DOT
987 ���  ���    U+22D8, U+22D9   VERY MUCH LESS-THAN/GREATER-THAN
988 ���  ���    U+22DC, U+22DD   EQUAL TO OR LESS-THAN/GREATER-THAN
989 ���  ���    U+22DE, U+22DF   EQUAL TO OR PRECEDES/SUCCEEDS
990 ���  ���    U+22E0, U+22E1   DOES NOT PRECEDE/SUCCEED OR EQUAL
991 ���  ���    U+22E6, U+22E7   LESS-THAN/GREATER-THAN BUT NOT EQUIVALENT TO
992 ���  ���    U+22E8, U+22E9   PRECEDES/SUCCEEDS BUT NOT EQUIVALENT TO
993 ���  ���    U+22F2, U+22FA   ELEMENT OF/CONTAINS WITH LONG HORIZONTAL STROKE
994 ���  ���    U+22F3, U+22FB   ELEMENT OF/CONTAINS WITH VERTICAL BAR AT END OF
995                          HORIZONTAL STROKE
996 ���  ���    U+22F4, U+22FC   SMALL ELEMENT OF/CONTAINS WITH VERTICAL BAR AT
997                          END OF HORIZONTAL STROKE
998 ���  ���    U+22F6, U+22FD   ELEMENT OF/CONTAINS WITH OVERBAR
999 ���  ���    U+22F7, U+22FE   SMALL ELEMENT OF/CONTAINS WITH OVERBAR
1000 ���  ���    U+2308, U+2309   LEFT/RIGHT CEILING
1001 ���  ���    U+230A, U+230B   LEFT/RIGHT FLOOR
1002 ���  ���    U+2326, U+232B   ERASE TO THE RIGHT/LEFT
1003 ��� ���   U+2329, U+232A   LEFT/RIGHT-POINTING ANGLE BRACKET
1004 ���  ���    U+2348, U+2347   APL FUNCTIONAL SYMBOL QUAD RIGHT/LEFTWARDS ARROW
1005 ��� ���   U+23E9, U+23EA   BLACK RIGHT/LEFT-POINTING DOUBLE TRIANGLE
1006 ���  ���    U+23ED, U+23EE   BLACK RIGHT/LEFT-POINTING DOUBLE TRIANGLE WITH
1007                          VERTICAL BAR
1008 ���  ���    U+261B, U+261A   BLACK RIGHT/LEFT POINTING INDEX
1009 ���  ���    U+261E, U+261C   WHITE RIGHT/LEFT POINTING INDEX
1010 ���  ���    U+269E, U+269F   THREE LINES CONVERGING RIGHT/LEFT
1011 ���  ���    U+2768, U+2769   MEDIUM LEFT/RIGHT PARENTHESIS ORNAMENT
1012 ���  ���    U+276A, U+276B   MEDIUM FLATTENED LEFT/RIGHT PARENTHESIS ORNAMENT
1013 ���  ���    U+276C, U+276D   MEDIUM LEFT/RIGHT-POINTING ANGLE BRACKET
1014                          ORNAMENT
1015 ���  ���    U+276E, U+276F   HEAVY LEFT/RIGHT-POINTING ANGLE QUOTATION MARK
1016                          ORNAMENT
1017 ���  ���    U+2770, U+2771   HEAVY LEFT/RIGHT-POINTING ANGLE BRACKET ORNAMENT
1018 ���  ���    U+2772, U+2773   LIGHT LEFT/RIGHT TORTOISE SHELL BRACKET ORNAMENT
1019 ���  ���    U+2774, U+2775   MEDIUM LEFT/RIGHT CURLY BRACKET ORNAMENT
1020 ���  ���    U+27C3, U+27C4   OPEN SUBSET/SUPERSET
1021 ���  ���    U+27C5, U+27C6   LEFT/RIGHT S-SHAPED BAG DELIMITER
1022 ���  ���    U+27C8, U+27C9   REVERSE SOLIDUS PRECEDING SUBSET,  SUPERSET
1023                          PRECEDING SOLIDUS
1024 ���  ���    U+27DE, U+27DD   LONG LEFT/RIGHT TACK
1025 ���  ���    U+27E6, U+27E7   MATHEMATICAL LEFT/RIGHT WHITE SQUARE BRACKET
1026 ���  ���    U+27E8, U+27E9   MATHEMATICAL LEFT/RIGHT ANGLE BRACKET
1027 ���  ���    U+27EA, U+27EB   MATHEMATICAL LEFT/RIGHT DOUBLE ANGLE BRACKET
1028 ���  ���    U+27EC, U+27ED   MATHEMATICAL LEFT/RIGHT WHITE TORTOISE SHELL
1029                          BRACKET
1030 ���  ���    U+27EE, U+27EF   MATHEMATICAL LEFT/RIGHT FLATTENED PARENTHESIS
1031 ���  ���    U+27F4, U+2B32   RIGHT/LEFT ARROW WITH CIRCLED PLUS
1032 ���  ���    U+27F6, U+27F5   LONG RIGHT/LEFTWARDS ARROW
1033 ���  ���    U+27F9, U+27F8   LONG RIGHT/LEFTWARDS DOUBLE ARROW
1034 ���  ���    U+27FC, U+27FB   LONG RIGHT/LEFTWARDS ARROW FROM BAR
1035 ���  ���    U+27FE, U+27FD   LONG RIGHT/LEFTWARDS DOUBLE ARROW FROM BAR
1036 ���  ���    U+27FF, U+2B33   LONG RIGHT/LEFTWARDS SQUIGGLE ARROW
1037 ���  ���    U+2900, U+2B34   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH VERTICAL
1038                          STROKE
1039 ���  ���    U+2901, U+2B35   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH DOUBLE
1040                          VERTICAL STROKE
1041 ���  ���    U+2903, U+2902   RIGHT/LEFTWARDS DOUBLE ARROW WITH VERTICAL
1042                          STROKE
1043 ���  ���    U+2905, U+2B36   RIGHT/LEFTWARDS TWO-HEADED ARROW FROM BAR
1044 ���  ���    U+2907, U+2906   RIGHT/LEFTWARDS DOUBLE ARROW FROM BAR
1045 ���  ���    U+290D, U+290C   RIGHT/LEFTWARDS DOUBLE DASH ARROW
1046 ���  ���    U+290F, U+290E   RIGHT/LEFTWARDS TRIPLE DASH ARROW
1047 ���  ���    U+2910, U+2B37   RIGHT/LEFTWARDS TWO-HEADED TRIPLE DASH ARROW
1048 ���  ���    U+2911, U+2B38   RIGHT/LEFTWARDS ARROW WITH DOTTED STEM
1049 ���  ���    U+2914, U+2B39   RIGHT/LEFTWARDS ARROW WITH TAIL WITH VERTICAL
1050                          STROKE
1051 ���  ���    U+2915, U+2B3A   RIGHT/LEFTWARDS ARROW WITH TAIL WITH DOUBLE
1052                          VERTICAL STROKE
1053 ���  ���    U+2916, U+2B3B   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL
1054 ���  ���    U+2917, U+2B3C   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH
1055                          VERTICAL STROKE
1056 ���  ���    U+2918, U+2B3D   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH
1057                          DOUBLE VERTICAL STROKE
1058 ���  ���    U+291A, U+2919   RIGHT/LEFTWARDS ARROW-TAIL
1059 ���  ���    U+291C, U+291B   RIGHT/LEFTWARDS DOUBLE ARROW-TAIL
1060 ���  ���    U+291E, U+291D   RIGHT/LEFTWARDS ARROW TO BLACK DIAMOND
1061 ���  ���    U+2920, U+291F   RIGHT/LEFTWARDS ARROW FROM BAR TO BLACK DIAMOND
1062 ���  ���    U+2933, U+2B3F   WAVE ARROW POINTING DIRECTLY RIGHT/LEFT
1063 ���  ���    U+2937, U+2936   ARROW POINTING DOWNWARDS THEN CURVING RIGHT/
1064                          LEFTWARDS
1065 ���  ���    U+2945, U+2946   RIGHT/LEFTWARDS ARROW WITH PLUS BELOW
1066 ���  ���    U+2947, U+2B3E   RIGHT/LEFTWARDS ARROW THROUGH X
1067 ���  ���    U+2953, U+2952   RIGHT/LEFTWARDS HARPOON WITH BARB UP TO BAR
1068 ���  ���    U+2957, U+2956   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN TO BAR
1069 ���  ���    U+295B, U+295A   RIGHT/LEFTWARDS HARPOON WITH BARB UP FROM BAR
1070 ���  ���    U+295F, U+295E   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN FROM BAR
1071 ���  ���    U+2964, U+2962   RIGHT/LEFTWARDS HARPOON WITH BARB UP ABOVE
1072                          RIGHT/LEFTWARDS HARPOON WITH BARB DOWN
1073 ���  ���    U+296C, U+296A   RIGHT/LEFTWARDS HARPOON WITH BARB UP ABOVE LONG
1074                          DASH
1075 ���  ���    U+296D, U+296B   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN BELOW
1076                          LONG DASH
1077 ���  ���    U+2971, U+2B40   EQUALS SIGN ABOVE RIGHT/LEFTWARDS ARROW
1078 ���  ���    U+2972, U+2B41   TILDE OPERATOR ABOVE RIGHTWARDS ARROW,  REVERSE
1079                          TILDE OPERATOR ABOVE LEFTWARDS ARROW
1080 ���  ���    U+2974, U+2B4B   RIGHTWARDS ARROW ABOVE TILDE OPERATOR,
1081                          LEFTWARDS ARROW ABOVE REVERSE TILDE OPERATOR
1082 ���  ���    U+2975, U+2B42   RIGHTWARDS ARROW ABOVE ALMOST EQUAL TO,
1083                          LEFTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO
1084 ���  ���    U+2979, U+297B   SUBSET/SUPERSET ABOVE RIGHT/LEFTWARDS ARROW
1085 ���  ���    U+2983, U+2984   LEFT/RIGHT WHITE CURLY BRACKET
1086 ���  ���    U+2985, U+2986   LEFT/RIGHT WHITE PARENTHESIS
1087 ���  ���    U+2987, U+2988   Z NOTATION LEFT/RIGHT IMAGE BRACKET
1088 ���  ���    U+2989, U+298A   Z NOTATION LEFT/RIGHT BINDING BRACKET
1089 ���  ���    U+298B, U+298C   LEFT/RIGHT SQUARE BRACKET WITH UNDERBAR
1090 ���  ���    U+298D, U+2990   LEFT/RIGHT SQUARE BRACKET WITH TICK IN TOP
1091                          CORNER
1092 ���  ���    U+298F, U+298E   LEFT/RIGHT SQUARE BRACKET WITH TICK IN BOTTOM
1093                          CORNER
1094 ���  ���    U+2991, U+2992   LEFT/RIGHT ANGLE BRACKET WITH DOT
1095 ���  ���    U+2993, U+2994   LEFT/RIGHT ARC LESS-THAN/GREATER-THAN BRACKET
1096 ���  ���    U+2995, U+2996   DOUBLE LEFT/RIGHT ARC GREATER-THAN/LESS-THAN
1097                          BRACKET
1098 ���  ���    U+2997, U+2998   LEFT/RIGHT BLACK TORTOISE SHELL BRACKET
1099 ���  ���    U+29A8, U+29A9   MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW
1100                          POINTING UP AND RIGHT/LEFT
1101 ���  ���    U+29AA, U+29AB   MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW
1102                          POINTING DOWN AND RIGHT/LEFT
1103 ���  ���    U+29B3, U+29B4   EMPTY SET WITH RIGHT/LEFT ARROW ABOVE
1104 ���  ���    U+29C0, U+29C1   CIRCLED LESS-THAN/GREATER-THAN
1105 ���  ���    U+29D8, U+29D9   LEFT/RIGHT WIGGLY FENCE
1106 ���  ���    U+29DA, U+29DB   LEFT/RIGHT DOUBLE WIGGLY FENCE
1107 ���  ���    U+29FC, U+29FD   LEFT/RIGHT-POINTING CURVED ANGLE BRACKET
1108 ���  ���    U+2A79, U+2A7A   LESS-THAN/GREATER-THAN WITH CIRCLE INSIDE
1109 ���  ���    U+2A7B, U+2A7C   LESS-THAN/GREATER-THAN WITH QUESTION MARK ABOVE
1110 ���  ���    U+2A7D, U+2A7E   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO
1111 ���  ���    U+2A7F, U+2A80   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
1112                          DOT INSIDE
1113 ���  ���    U+2A81, U+2A82   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
1114                          DOT ABOVE
1115 ���  ���    U+2A83, U+2A84   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
1116                          DOT ABOVE RIGHT/LEFT
1117 ���  ���    U+2A85, U+2A86   LESS-THAN/GREATER-THAN OR APPROXIMATE
1118 ���  ���    U+2A87, U+2A88   LESS-THAN/GREATER-THAN AND SINGLE-LINE NOT
1119                          EQUAL TO
1120 ���  ���    U+2A89, U+2A8A   LESS-THAN/GREATER-THAN AND NOT APPROXIMATE
1121 ���  ���    U+2A8D, U+2A8E   LESS-THAN/GREATER-THAN ABOVE SIMILAR OR EQUAL
1122 ���  ���    U+2A95, U+2A96   SLANTED EQUAL TO OR LESS-THAN/GREATER-THAN
1123 ���  ���    U+2A97, U+2A98   SLANTED EQUAL TO OR LESS-THAN/GREATER-THAN WITH
1124                          DOT INSIDE
1125 ���  ���    U+2A99, U+2A9A   DOUBLE-LINE EQUAL TO OR LESS-THAN/GREATER-THAN
1126 ���  ���    U+2A9B, U+2A9C   DOUBLE-LINE SLANTED EQUAL TO OR LESS-THAN/
1127                          GREATER-THAN
1128 ���  ���    U+2A9D, U+2A9E   SIMILAR OR LESS-THAN/GREATER-THAN
1129 ���  ���    U+2A9F, U+2AA0   SIMILAR ABOVE LESS-THAN/GREATER-THAN ABOVE
1130                          EQUALS SIGN
1131 ���  ���    U+2AA1, U+2AA2   DOUBLE NESTED LESS-THAN/GREATER-THAN
1132 ���  ���    U+2AA6, U+2AA7   LESS-THAN/GREATER-THAN CLOSED BY CURVE
1133 ���  ���    U+2AA8, U+2AA9   LESS-THAN/GREATER-THAN CLOSED BY CURVE ABOVE
1134                          SLANTED EQUAL
1135 ���  ���    U+2AAA, U+2AAB   SMALLER THAN/LARGER THAN
1136 ���  ���    U+2AAC, U+2AAD   SMALLER THAN/LARGER THAN OR EQUAL TO
1137 ���  ���    U+2AAF, U+2AB0   PRECEDES/SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN
1138 ���  ���    U+2AB1, U+2AB2   PRECEDES/SUCCEEDS ABOVE SINGLE-LINE NOT EQUAL TO
1139 ���  ���    U+2AB3, U+2AB4   PRECEDES/SUCCEEDS ABOVE EQUALS SIGN
1140 ���  ���    U+2AB5, U+2AB6   PRECEDES/SUCCEEDS ABOVE NOT EQUAL TO
1141 ���  ���    U+2AB7, U+2AB8   PRECEDES/SUCCEEDS ABOVE ALMOST EQUAL TO
1142 ���  ���    U+2AB9, U+2ABA   PRECEDES/SUCCEEDS ABOVE NOT ALMOST EQUAL TO
1143 ���  ���    U+2ABB, U+2ABC   DOUBLE PRECEDES/SUCCEEDS
1144 ���  ���    U+2ABD, U+2ABE   SUBSET/SUPERSET WITH DOT
1145 ���  ���    U+2ABF, U+2AC0   SUBSET/SUPERSET WITH PLUS SIGN BELOW
1146 ���  ���    U+2AC1, U+2AC2   SUBSET/SUPERSET WITH MULTIPLICATION SIGN BELOW
1147 ���  ���    U+2AC3, U+2AC4   SUBSET/SUPERSET OF OR EQUAL TO WITH DOT ABOVE
1148 ���  ���    U+2AC5, U+2AC6   SUBSET/SUPERSET OF ABOVE EQUALS SIGN
1149 ���  ���    U+2AC7, U+2AC8   SUBSET/SUPERSET OF ABOVE TILDE OPERATOR
1150 ���  ���    U+2AC9, U+2ACA   SUBSET/SUPERSET OF ABOVE ALMOST EQUAL TO
1151 ���  ���    U+2ACB, U+2ACC   SUBSET/SUPERSET OF ABOVE NOT EQUAL TO
1152 ���  ���    U+2ACF, U+2AD0   CLOSED SUBSET/SUPERSET
1153 ���  ���    U+2AD1, U+2AD2   CLOSED SUBSET/SUPERSET OR EQUAL TO
1154 ���  ���    U+2AD5, U+2AD6   SUBSET/SUPERSET ABOVE SUBSET/SUPERSET
1155 ���  ���    U+2AE5, U+22AB   DOUBLE VERTICAL BAR DOUBLE LEFT/RIGHT TURNSTILE
1156 ���  ���    U+2AF7, U+2AF8   TRIPLE NESTED LESS-THAN/GREATER-THAN
1157 ���  ���    U+2AF9, U+2AFA   DOUBLE-LINE SLANTED LESS-THAN/GREATER-THAN OR
1158                          EQUAL TO
1159 ���  ���    U+2B46, U+2B45   RIGHT/LEFTWARDS QUADRUPLE ARROW
1160 ���  ���    U+2B47, U+2B49   REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW,
1161                          TILDE OPERATOR ABOVE LEFTWARDS ARROW
1162 ���  ���    U+2B48, U+2B4A   RIGHTWARDS ARROW ABOVE REVERSE ALMOST EQUAL
1163                          TO,  LEFTWARDS ARROW ABOVE ALMOST EQUAL TO
1164 ���  ���    U+2B4C, U+2973   RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR,
1165                          LEFTWARDS ARROW ABOVE TILDE OPERATOR
1166 ���  ���    U+2B62, U+2B60   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW
1167 ���  ���    U+2B6C, U+2B6A   RIGHT/LEFTWARDS TRIANGLE-HEADED DASHED ARROW
1168 ���  ���    U+2B72, U+2B70   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW TO BAR
1169 ���  ���    U+2B7C, U+2B7A   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
1170                          DOUBLE VERTICAL STROKE
1171 ���  ���    U+2B86, U+2B84   RIGHT/LEFTWARDS TRIANGLE-HEADED PAIRED ARROWS
1172 ���  ���    U+2B8A, U+2B88   RIGHT/LEFTWARDS BLACK CIRCLED WHITE ARROW
1173 ���  ���    U+2B95, U+2B05   RIGHT/LEFTWARDS BLACK ARROW
1174 ���  ���    U+2B9A, U+2B98   THREE-D TOP-LIGHTED RIGHT/LEFTWARDS EQUILATERAL
1175                          ARROWHEAD
1176 ���  ���    U+2B9E, U+2B9C   BLACK RIGHT/LEFTWARDS EQUILATERAL ARROWHEAD
1177 ���  ���    U+2BA1, U+2BA0   DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP
1178                          RIGHT/LEFTWARDS
1179 ���  ���    U+2BA3, U+2BA2   UPWARDS TRIANGLE-HEADED ARROW WITH LONG TIP
1180                          RIGHT/LEFTWARDS
1181 ���  ���    U+2BA9, U+2BA8   BLACK CURVED DOWNWARDS AND RIGHT/LEFTWARDS ARROW
1182 ���  ���    U+2BAB, U+2BAA   BLACK CURVED UPWARDS AND RIGHT/LEFTWARDS ARROW
1183 ���  ���    U+2BB1, U+2BB0   RIBBON ARROW DOWN RIGHT/LEFT
1184 ���  ���    U+2BB3, U+2BB2   RIBBON ARROW UP RIGHT/LEFT
1185 ���  ���    U+2BEE, U+2BEC   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE
1186                          ARROWHEADS
1187 ���  ���    U+2E02, U+2E03   LEFT/RIGHT SUBSTITUTION BRACKET
1188 ���  ���    U+2E03, U+2E02   RIGHT/LEFT SUBSTITUTION BRACKET
1189 ���  ���    U+2E04, U+2E05   LEFT/RIGHT DOTTED SUBSTITUTION BRACKET
1190 ���  ���    U+2E05, U+2E04   RIGHT/LEFT DOTTED SUBSTITUTION BRACKET
1191 ���  ���    U+2E09, U+2E0A   LEFT/RIGHT TRANSPOSITION BRACKET
1192 ���  ���    U+2E0A, U+2E09   RIGHT/LEFT TRANSPOSITION BRACKET
1193 ���  ���    U+2E0C, U+2E0D   LEFT/RIGHT RAISED OMISSION BRACKET
1194 ���  ���    U+2E0D, U+2E0C   RIGHT/LEFT RAISED OMISSION BRACKET
1195 ���  ���    U+2E11, U+2E10   REVERSED FORKED PARAGRAPHOS,  FORKED PARAGRAPHOS
1196 ���  ���    U+2E1C, U+2E1D   LEFT/RIGHT LOW PARAPHRASE BRACKET
1197 ���  ���    U+2E1D, U+2E1C   RIGHT/LEFT LOW PARAPHRASE BRACKET
1198 ���  ���    U+2E20, U+2E21   LEFT/RIGHT VERTICAL BAR WITH QUILL
1199 ���  ���    U+2E21, U+2E20   RIGHT/LEFT VERTICAL BAR WITH QUILL
1200 ���  ���    U+2E22, U+2E23   TOP LEFT/RIGHT HALF BRACKET
1201 ���  ���    U+2E24, U+2E25   BOTTOM LEFT/RIGHT HALF BRACKET
1202 ���  ���    U+2E26, U+2E27   LEFT/RIGHT SIDEWAYS U BRACKET
1203 ���  ���    U+2E28, U+2E29   LEFT/RIGHT DOUBLE PARENTHESIS
1204 ���  ���    U+2E36, U+2E37   DAGGER WITH LEFT/RIGHT GUARD
1205 ���  ���    U+2E42, U+201E   DOUBLE LOW-REVERSED-9 QUOTATION MARK,  DOUBLE
1206                          LOW-9 QUOTATION MARK
1207 ���  ���    U+2E55, U+2E56   LEFT/RIGHT SQUARE BRACKET WITH STROKE
1208 ���  ���    U+2E57, U+2E58   LEFT/RIGHT SQUARE BRACKET WITH DOUBLE STROKE
1209 ���  ���    U+2E59, U+2E5A   TOP HALF LEFT/RIGHT PARENTHESIS
1210 ���  ���    U+2E5B, U+2E5C   BOTTOM HALF LEFT/RIGHT PARENTHESIS
1211 ��� ���   U+3008, U+3009   LEFT/RIGHT ANGLE BRACKET
1212 ��� ���   U+300A, U+300B   LEFT/RIGHT DOUBLE ANGLE BRACKET
1213 ��� ���   U+300C, U+300D   LEFT/RIGHT CORNER BRACKET
1214 ��� ���   U+300E, U+300F   LEFT/RIGHT WHITE CORNER BRACKET
1215 ��� ���   U+3010, U+3011   LEFT/RIGHT BLACK LENTICULAR BRACKET
1216 ��� ���   U+3014, U+3015   LEFT/RIGHT TORTOISE SHELL BRACKET
1217 ��� ���   U+3016, U+3017   LEFT/RIGHT WHITE LENTICULAR BRACKET
1218 ��� ���   U+3018, U+3019   LEFT/RIGHT WHITE TORTOISE SHELL BRACKET
1219 ��� ���   U+301A, U+301B   LEFT/RIGHT WHITE SQUARE BRACKET
1220 ��� ���   U+301D, U+301E   REVERSED DOUBLE PRIME QUOTATION MARK,  DOUBLE
1221                          PRIME QUOTATION MARK
1222 ���  ���    U+A9C1, U+A9C2   JAVANESE LEFT/RIGHT RERENGGAN
1223 ���  ���    U+FD3E, U+FD3F   ORNATE LEFT/RIGHT PARENTHESIS
1224 ��� ���   U+FE59, U+FE5A   SMALL LEFT/RIGHT PARENTHESIS
1225 ��� ���   U+FE5B, U+FE5C   SMALL LEFT/RIGHT CURLY BRACKET
1226 ��� ���   U+FE5D, U+FE5E   SMALL LEFT/RIGHT TORTOISE SHELL BRACKET
1227 ��� ���   U+FE64, U+FE65   SMALL LESS-THAN/GREATER-THAN SIGN
1228 ��� ���   U+FF08, U+FF09   FULLWIDTH LEFT/RIGHT PARENTHESIS
1229 ��� ���   U+FF1C, U+FF1E   FULLWIDTH LESS-THAN/GREATER-THAN SIGN
1230 ��� ���   U+FF3B, U+FF3D   FULLWIDTH LEFT/RIGHT SQUARE BRACKET
1231 ��� ���   U+FF5B, U+FF5D   FULLWIDTH LEFT/RIGHT CURLY BRACKET
1232 ��� ���   U+FF5F, U+FF60   FULLWIDTH LEFT/RIGHT WHITE PARENTHESIS
1233 ���  ���    U+FF62, U+FF63   HALFWIDTH LEFT/RIGHT CORNER BRACKET
1234 ���  ���    U+FFEB, U+FFE9   HALFWIDTH RIGHT/LEFTWARDS ARROW
1235 ����  ����    U+1D103, U+1D102 MUSICAL SYMBOL REVERSE FINAL BARLINE,  MUSICAL
1236                          SYMBOL FINAL BARLINE
1237 ����  ����    U+1D106, U+1D107 MUSICAL SYMBOL LEFT/RIGHT REPEAT SIGN
1238 ���� ����   U+1F449, U+1F448 WHITE RIGHT/LEFT POINTING BACKHAND INDEX
1239 ���� ����    U+1F508, U+1F568 SPEAKER,  RIGHT SPEAKER
1240 ���� ����    U+1F509, U+1F569 SPEAKER WITH ONE SOUND WAVE,  RIGHT SPEAKER WITH
1241                          ONE SOUND WAVE
1242 ���� ����    U+1F50A, U+1F56A SPEAKER WITH THREE SOUND WAVES,  RIGHT SPEAKER
1243                          WITH THREE SOUND WAVES
1244 ����  ����    U+1F57B, U+1F57D LEFT/RIGHT HAND TELEPHONE RECEIVER
1245 ����  ����    U+1F599, U+1F598 SIDEWAYS WHITE RIGHT/LEFT POINTING INDEX
1246 ����  ����    U+1F59B, U+1F59A SIDEWAYS BLACK RIGHT/LEFT POINTING INDEX
1247 ����  ����    U+1F59D, U+1F59C BLACK RIGHT/LEFT POINTING BACKHAND INDEX
1248 ����  ����    U+1F5E6, U+1F5E7 THREE RAYS LEFT/RIGHT
1249 ����  ����    U+1F802, U+1F800 RIGHT/LEFTWARDS ARROW WITH SMALL TRIANGLE
1250                          ARROWHEAD
1251 ����  ����    U+1F806, U+1F804 RIGHT/LEFTWARDS ARROW WITH MEDIUM TRIANGLE
1252                          ARROWHEAD
1253 ����  ����    U+1F80A, U+1F808 RIGHT/LEFTWARDS ARROW WITH LARGE TRIANGLE
1254                          ARROWHEAD
1255 ����  ����    U+1F812, U+1F810 RIGHT/LEFTWARDS ARROW WITH SMALL EQUILATERAL
1256                          ARROWHEAD
1257 ����  ����    U+1F816, U+1F814 RIGHT/LEFTWARDS ARROW WITH EQUILATERAL ARROWHEAD
1258 ����  ����    U+1F81A, U+1F818 HEAVY RIGHT/LEFTWARDS ARROW WITH EQUILATERAL
1259                          ARROWHEAD
1260 ����  ����    U+1F81E, U+1F81C HEAVY RIGHT/LEFTWARDS ARROW WITH LARGE
1261                          EQUILATERAL ARROWHEAD
1262 ����  ����    U+1F822, U+1F820 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
1263                          NARROW SHAFT
1264 ����  ����    U+1F826, U+1F824 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
1265                          MEDIUM SHAFT
1266 ����  ����    U+1F82A, U+1F828 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH BOLD
1267                          SHAFT
1268 ����  ����    U+1F82E, U+1F82C RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
1269                          HEAVY SHAFT
1270 ����  ����    U+1F832, U+1F830 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH VERY
1271                          HEAVY SHAFT
1272 ����  ����    U+1F836, U+1F834 RIGHT/LEFTWARDS FINGER-POST ARROW
1273 ����  ����    U+1F83A, U+1F838 RIGHT/LEFTWARDS SQUARED ARROW
1274 ����  ����    U+1F83E, U+1F83C RIGHT/LEFTWARDS COMPRESSED ARROW
1275 ����  ����    U+1F842, U+1F840 RIGHT/LEFTWARDS HEAVY COMPRESSED ARROW
1276 ����  ����    U+1F846, U+1F844 RIGHT/LEFTWARDS HEAVY ARROW
1277 ����  ����    U+1F852, U+1F850 RIGHT/LEFTWARDS SANS-SERIF ARROW
1278 ����  ����    U+1F862, U+1F860 WIDE-HEADED RIGHT/LEFTWARDS LIGHT BARB ARROW
1279 ����  ����    U+1F86A, U+1F868 WIDE-HEADED RIGHT/LEFTWARDS BARB ARROW
1280 ����  ����    U+1F872, U+1F870 WIDE-HEADED RIGHT/LEFTWARDS MEDIUM BARB ARROW
1281 ����  ����    U+1F87A, U+1F878 WIDE-HEADED RIGHT/LEFTWARDS HEAVY BARB ARROW
1282 ����  ����    U+1F882, U+1F880 WIDE-HEADED RIGHT/LEFTWARDS VERY HEAVY BARB
1283                          ARROW
1284 ����  ����    U+1F892, U+1F890 RIGHT/LEFTWARDS TRIANGLE ARROWHEAD
1285 ����  ����    U+1F896, U+1F894 RIGHT/LEFTWARDS WHITE ARROW WITHIN TRIANGLE
1286                          ARROWHEAD
1287 ����  ����    U+1F89A, U+1F898 RIGHT/LEFTWARDS ARROW WITH NOTCHED TAIL
1288 ����  ����    U+1F8A1, U+1F8A0 RIGHTWARDS BOTTOM SHADED WHITE ARROW,
1289                          LEFTWARDS BOTTOM-SHADED WHITE ARROW
1290 ����  ����    U+1F8A3, U+1F8A2 RIGHT/LEFTWARDS TOP SHADED WHITE ARROW
1291 ����  ����    U+1F8A5, U+1F8A6 RIGHT/LEFTWARDS RIGHT-SHADED WHITE ARROW
1292 ����  ����    U+1F8A7, U+1F8A4 RIGHT/LEFTWARDS LEFT-SHADED WHITE ARROW
1293 ����  ����    U+1F8A9, U+1F8A8 RIGHT/LEFTWARDS BACK-TILTED SHADOWED WHITE ARROW
1294 ����  ����    U+1F8AB, U+1F8AA RIGHT/LEFTWARDS FRONT-TILTED SHADOWED WHITE
1295                          ARROW
1296
1297=head2 The 'module_true' feature
1298
1299This feature removes the need to return a true value at the end of a module
1300loaded with C<require> or C<use>. Any errors during compilation will cause
1301failures, but reaching the end of the module when this feature is in effect
1302will prevent C<perl> from throwing an exception that the module "did not return
1303a true value".
1304
1305=head2 The 'class' feature
1306
1307B<WARNING>: This feature is still experimental and the implementation may
1308change or be removed in future versions of Perl.  For this reason, Perl will
1309warn when you use the feature, unless you have explicitly disabled the warning:
1310
1311    no warnings "experimental::class";
1312
1313This feature enables the C<class> block syntax and other associated keywords
1314which implement the "new" object system, previously codenamed "Corinna".
1315
1316=head1 FEATURE BUNDLES
1317
1318It's possible to load multiple features together, using
1319a I<feature bundle>.  The name of a feature bundle is prefixed with
1320a colon, to distinguish it from an actual feature.
1321
1322  use feature ":5.10";
1323
1324The following feature bundles are available:
1325
1326  bundle    features included
1327  --------- -----------------
1328PODTURES
1329The C<:default> bundle represents the feature set that is enabled before
1330any C<use feature> or C<no feature> declaration.
1331
1332Specifying sub-versions such as the C<0> in C<5.14.0> in feature bundles has
1333no effect.  Feature bundles are guaranteed to be the same for all sub-versions.
1334
1335  use feature ":5.14.0";    # same as ":5.14"
1336  use feature ":5.14.1";    # same as ":5.14"
1337
1338=head1 IMPLICIT LOADING
1339
1340Instead of loading feature bundles by name, it is easier to let Perl do
1341implicit loading of a feature bundle for you.
1342
1343There are two ways to load the C<feature> pragma implicitly:
1344
1345=over 4
1346
1347=item *
1348
1349By using the C<-E> switch on the Perl command-line instead of C<-e>.
1350That will enable the feature bundle for that version of Perl in the
1351main compilation unit (that is, the one-liner that follows C<-E>).
1352
1353=item *
1354
1355By explicitly requiring a minimum Perl version number for your program, with
1356the C<use VERSION> construct.  That is,
1357
1358    use v5.36.0;
1359
1360will do an implicit
1361
1362    no feature ':all';
1363    use feature ':5.36';
1364
1365and so on.  Note how the trailing sub-version
1366is automatically stripped from the
1367version.
1368
1369But to avoid portability warnings (see L<perlfunc/use>), you may prefer:
1370
1371    use 5.036;
1372
1373with the same effect.
1374
1375If the required version is older than Perl 5.10, the ":default" feature
1376bundle is automatically loaded instead.
1377
1378Unlike C<use feature ":5.12">, saying C<use v5.12> (or any higher version)
1379also does the equivalent of C<use strict>; see L<perlfunc/use> for details.
1380
1381=back
1382
1383=head1 CHECKING FEATURES
1384
1385C<feature> provides some simple APIs to check which features are enabled.
1386
1387These functions cannot be imported and must be called by their fully
1388qualified names.  If you don't otherwise need to set a feature you will
1389need to ensure C<feature> is loaded with:
1390
1391  use feature ();
1392
1393=over
1394
1395=item feature_enabled($feature)
1396
1397=item feature_enabled($feature, $depth)
1398
1399  package MyStandardEnforcer;
1400  use feature ();
1401  use Carp "croak";
1402  sub import {
1403    croak "disable indirect!" if feature::feature_enabled("indirect");
1404  }
1405
1406Test whether a named feature is enabled at a given level in the call
1407stack, returning a true value if it is.  C<$depth> defaults to 1,
1408which checks the scope that called the scope calling
1409feature::feature_enabled().
1410
1411croaks for an unknown feature name.
1412
1413=item features_enabled()
1414
1415=item features_enabled($depth)
1416
1417  package ReportEnabledFeatures;
1418  use feature "say";
1419  sub import {
1420    say STDERR join " ", feature::features_enabled();
1421  }
1422
1423Returns a list of the features enabled at a given level in the call
1424stack.  C<$depth> defaults to 1, which checks the scope that called
1425the scope calling feature::features_enabled().
1426
1427=item feature_bundle()
1428
1429=item feature_bundle($depth)
1430
1431Returns the feature bundle, if any, selected at a given level in the
1432call stack.  C<$depth> defaults to 1, which checks the scope that called
1433the scope calling feature::feature_bundle().
1434
1435Returns an undefined value if no feature bundle is selected in the
1436scope.
1437
1438The bundle name returned will be for the earliest bundle matching the
1439selected bundle, so:
1440
1441  use feature ();
1442  use v5.12;
1443  BEGIN { print feature::feature_bundle(0); }
1444
1445will print C<5.11>.
1446
1447This returns internal state, at this point C<use v5.12;> sets the
1448feature bundle, but C< use feature ":5.12"; > does not set the feature
1449bundle.  This may change in a future release of perl.
1450
1451=back
1452
1453=cut
1454
1455sub import {
1456    shift;
1457
1458    if (!@_) {
1459        croak("No features specified");
1460    }
1461
1462    __common(1, @_);
1463}
1464
1465sub unimport {
1466    shift;
1467
1468    # A bare C<no feature> should reset to the default bundle
1469    if (!@_) {
1470	$^H &= ~($hint_uni8bit|$hint_mask);
1471	return;
1472    }
1473
1474    __common(0, @_);
1475}
1476
1477
1478sub __common {
1479    my $import = shift;
1480    my $bundle_number = $^H & $hint_mask;
1481    my $features = $bundle_number != $hint_mask
1482      && $feature_bundle{$hint_bundles[$bundle_number >> $hint_shift]};
1483    if ($features) {
1484	# Features are enabled implicitly via bundle hints.
1485	# Delete any keys that may be left over from last time.
1486	delete @^H{ values(%feature) };
1487	$^H |= $hint_mask;
1488	for (@$features) {
1489	    $^H{$feature{$_}} = 1;
1490	    $^H |= $hint_uni8bit if $_ eq 'unicode_strings';
1491	}
1492    }
1493    while (@_) {
1494        my $name = shift;
1495        if (substr($name, 0, 1) eq ":") {
1496            my $v = substr($name, 1);
1497            if (!exists $feature_bundle{$v}) {
1498                $v =~ s/^([0-9]+)\.([0-9]+).[0-9]+$/$1.$2/;
1499                if (!exists $feature_bundle{$v}) {
1500                    unknown_feature_bundle(substr($name, 1));
1501                }
1502            }
1503            unshift @_, @{$feature_bundle{$v}};
1504            next;
1505        }
1506        if (!exists $feature{$name}) {
1507            if (exists $noops{$name}) {
1508                next;
1509            }
1510            if (!$import && exists $removed{$name}) {
1511                next;
1512            }
1513            unknown_feature($name);
1514        }
1515	if ($import) {
1516	    $^H{$feature{$name}} = 1;
1517	    $^H |= $hint_uni8bit if $name eq 'unicode_strings';
1518	} else {
1519            delete $^H{$feature{$name}};
1520            $^H &= ~ $hint_uni8bit if $name eq 'unicode_strings';
1521        }
1522    }
1523}
1524
1525sub unknown_feature {
1526    my $feature = shift;
1527    croak(sprintf('Feature "%s" is not supported by Perl %vd',
1528            $feature, $^V));
1529}
1530
1531sub unknown_feature_bundle {
1532    my $feature = shift;
1533    croak(sprintf('Feature bundle "%s" is not supported by Perl %vd',
1534            $feature, $^V));
1535}
1536
1537sub croak {
1538    require Carp;
1539    Carp::croak(@_);
1540}
1541
1542sub features_enabled {
1543    my ($depth) = @_;
1544
1545    $depth //= 1;
1546    my @frame = caller($depth+1)
1547      or return;
1548    my ($hints, $hinthash) = @frame[8, 10];
1549
1550    my $bundle_number = $hints & $hint_mask;
1551    if ($bundle_number != $hint_mask) {
1552        return $feature_bundle{$hint_bundles[$bundle_number >> $hint_shift]}->@*;
1553    }
1554    else {
1555        my @features;
1556        for my $feature (sort keys %feature) {
1557            if ($hinthash->{$feature{$feature}}) {
1558                push @features, $feature;
1559            }
1560        }
1561        return @features;
1562    }
1563}
1564
1565sub feature_enabled {
1566    my ($feature, $depth) = @_;
1567
1568    $depth //= 1;
1569    my @frame = caller($depth+1)
1570      or return;
1571    my ($hints, $hinthash) = @frame[8, 10];
1572
1573    my $hint_feature = $feature{$feature}
1574      or croak "Unknown feature $feature";
1575    my $bundle_number = $hints & $hint_mask;
1576    if ($bundle_number != $hint_mask) {
1577        my $bundle = $hint_bundles[$bundle_number >> $hint_shift];
1578        for my $bundle_feature ($feature_bundle{$bundle}->@*) {
1579            return 1 if $bundle_feature eq $feature;
1580        }
1581        return 0;
1582    }
1583    else {
1584        return $hinthash->{$hint_feature} // 0;
1585    }
1586}
1587
1588sub feature_bundle {
1589    my $depth = shift;
1590
1591    $depth //= 1;
1592    my @frame = caller($depth+1)
1593      or return;
1594    my $bundle_number = $frame[8] & $hint_mask;
1595    if ($bundle_number != $hint_mask) {
1596        return $hint_bundles[$bundle_number >> $hint_shift];
1597    }
1598    else {
1599        return undef;
1600    }
1601}
1602
16031;
1604