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