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