内容

名称

功能 - 启用新功能的 Perl 编译指示

概要

use feature qw(fc say);

# Without the "use feature" above, this code would not be able to find
# the built-ins "say" or "fc":
say "The case-folded version of $x is: " . fc $x;


# set features to match the :5.36 bundle, which may turn off or on
# multiple features (see "FEATURE BUNDLES" below)
use feature ':5.36';


# implicitly loads :5.36 feature bundle
use v5.36;

描述

在不破坏现有程序的情况下,通常无法向 Perl 添加新的语法。此编译指示提供了一种将此风险降至最低的方法。新的语法结构或对旧结构的新语义含义可以通过 use feature 'foo' 启用,并且只有在相应的特征编译指示在作用域内时才会被解析。(但是,CORE:: 前缀提供了对所有 Perl 关键字的访问,无论此编译指示如何。)

词法影响

与其他编译指示(例如 use strict)一样,特性具有词法影响。use feature qw(foo) 仅从该点到封闭块的末尾使特性“foo”可用。

{
    use feature 'say';
    say "say is available here";
}
print "But not here.\n";

no feature

也可以使用 no feature "foo" 关闭特性。这也有词法影响。

use feature 'say';
say "say is available here";
{
    no feature 'say';
    print "But not here.\n";
}
say "Yet it is here.";

no feature 未指定任何特性将重置为默认组。要禁用所有特性(非常规请求!),请使用 no feature ':all'

可用特性

阅读 "特性捆绑" 以获取特性速查表摘要。

'say' 特性

use feature 'say' 告诉编译器启用受 Raku 启发的 say 函数。

有关详细信息,请参阅 "perlfunc 中的 say"

此特性从 Perl 5.10 开始可用。

'state' 特性

use feature 'state' 告诉编译器启用 state 变量。

有关详细信息,请参阅 "perlsub 中的持久私有变量"

此特性从 Perl 5.10 开始可用。

'switch' 特性

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::smartmatch";

use feature 'switch' 告诉编译器启用 Raku 的 given/when 结构。

有关详细信息,请参阅 "perlsyn 中的 Switch 语句"

此特性从 Perl 5.10 开始可用。从 Perl 5.38 开始已弃用,使用 givenwhen 或智能匹配将引发警告。它将在 Perl 5.42 中删除。

'unicode_strings' 特性

use feature 'unicode_strings' 告诉编译器在所有字符串操作(除非它们也在 use localeuse bytes 的范围内)执行的范围内使用 Unicode 规则。同样适用于在该范围内编译的所有正则表达式,即使在该范围之外执行也是如此。它不会更改字符串的内部表示,而只会更改它们的解释方式。

no feature 'unicode_strings' 告诉编译器使用传统的 Perl 规则,其中使用原生字符集规则,除非 Perl 明确知道需要 Unicode。这会导致一些意外情况,因为行为会突然发生变化。(有关详细信息,请参阅 "perlunicode 中的“Unicode 错误”"。)因此,如果您在程序中可能使用 Unicode,则强烈建议使用 use feature 'unicode_strings' 子pragma。

此功能从 Perl 5.12 开始可用;在 Perl 5.14 中几乎完全实现;并在 Perl 5.16 中扩展到涵盖 quotemeta;在 Perl 5.26 中进一步扩展到涵盖 范围运算符;并在 Perl 5.28 中再次扩展到涵盖 特殊情况下的空格拆分

'unicode_eval' 和 'evalbytes' 功能

这两个功能旨在共同取代传统的字符串 eval 函数,该函数在某些情况下行为存在问题。它们从 Perl 5.16 开始可用,并且默认情况下通过 use 5.16 或更高版本的声明启用。

unicode_eval 更改了普通字符串 eval 的行为,使其更加一致,尤其是在 Unicode 世界中。某些(错误)行为无法更改,否则会破坏一些依赖它们的代码,因此该功能可以启用和禁用。有关详细信息,请参阅 "perlfunc 中的“unicode_eval”功能"

evalbytes 与字符串 eval 相似,但它将参数视为字节字符串。有关详细信息,请参阅 "perlfunc 中的 evalbytes EXPR"。在当前作用域中没有 use feature 'evalbytes'use v5.16(或更高版本)声明的情况下,您仍然可以通过编写 CORE::evalbytes 来访问它。

'current_sub' 功能

这提供了 __SUB__ 令牌,该令牌返回对当前子例程的引用,或者在子例程外部返回 undef

此功能从 Perl 5.16 开始可用。

'array_base' 功能

此功能支持传统的 $[ 变量。请参阅 "perlvar 中的 $["。它默认情况下处于启用状态,但在 use v5.16 下被禁用(请参阅下面的 "隐式加载"),并且从 perl 5.30 开始不可用。

此功能从 Perl 5.16 开始以该名称提供。在之前的版本中,它始终处于启用状态,并且此 pragma 对它一无所知。

'fc' 功能

use feature 'fc' 告诉编译器启用 fc 函数,该函数实现 Unicode 大小写折叠。

有关详细信息,请参阅 "perlfunc 中的 fc"

此功能从 Perl 5.16 开始提供。

'lexical_subs' 功能

在 Perl 5.26 之前的版本中,此功能通过 my sub foostate sub fooour sub foo 语法启用子例程的声明。有关详细信息,请参阅 "perlsub 中的词法子例程"

此功能从 Perl 5.18 开始提供。从 Perl 5.18 到 5.24,它被归类为实验性功能,并且 Perl 在使用它时会发出警告,除非显式禁用。

no warnings "experimental::lexical_subs";

从 Perl 5.26 开始,使用此功能不再触发警告,尽管 experimental::lexical_subs 警告类别仍然存在(为了与禁用它的代码兼容)。此外,此语法不仅不再是实验性的,而且对所有 Perl 代码都启用,无论作用域中有哪些功能声明。

'postderef' 和 'postderef_qq' 功能

'postderef_qq' 功能扩展了 后缀解引用语法 的适用性,以便在双引号插值中可以使用后缀数组解引用、后缀标量解引用和后缀数组最高索引访问。例如,它使以下两个语句等效

my $s = "[@{ $h->{a} }]";
my $s = "[$h->{a}->@*]";

此功能从 Perl 5.20 开始提供。在 Perl 5.20 和 5.22 中,它被归类为实验性功能,并且 Perl 在使用它时会发出警告,除非显式禁用。

no warnings "experimental::postderef";

从 Perl 5.24 开始,使用此功能不再触发警告,尽管 experimental::postderef 警告类别仍然存在(为了与禁用它的代码兼容)。

'postderef' 功能在 Perl 5.20 和 Perl 5.22 中用于在双引号插值之外启用后缀解引用语法。在这些版本中,使用它会像 'postderef_qq' 功能一样触发 experimental::postderef 警告。从 Perl 5.24 开始,此语法不仅不再是实验性的,而且对所有 Perl 代码都启用,无论作用域中有哪些功能声明。

“signatures” 特性

此特性允许使用语法将子程序参数声明为词法变量。例如,对于以下子程序

sub foo ($left, $right) {
    return $left + $right;
}

调用 foo(3, 7) 将把 3 赋值给 $left,并将 7 赋值给 $right

有关详细信息,请参阅 "Signatures" in perlsub

此特性从 Perl 5.20 开始可用。从 Perl 5.20 到 5.34,它被归类为实验性特性,Perl 会在使用它时发出警告,除非明确禁用。

no warnings "experimental::signatures";

从 Perl 5.36 开始,使用此特性不再触发警告,尽管 experimental::signatures 警告类别仍然存在(为了与禁用它的代码兼容)。此特性现在被认为是稳定的,并且会由 use v5.36(或更高版本)自动启用。

“refaliasing” 特性

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::refaliasing";

此特性允许通过赋值给引用来进行别名。

\$a = \$b; # $a and $b now point to the same scalar
\@a = \@b; #                     to the same array
\%a = \%b;
\&a = \&b;
foreach \%hash (@array_of_hash_refs) {
    ...
}

有关详细信息,请参阅 "Assigning to References" in perlref

此特性从 Perl 5.22 开始可用。

“bitwise” 特性

此特性使四个标准的按位运算符(& | ^ ~)始终将其操作数视为数字,并引入了四个新的带点运算符(&. |. ^. ~.),它们始终将其操作数视为字符串。赋值变体(&= |= ^= &.= |.= ^.=)也是如此。

有关详细信息,请参阅 "Bitwise String Operators" in perlop

此特性从 Perl 5.22 开始可用。从 Perl 5.28 开始,use v5.28 将启用此特性。在 5.28 之前,它仍然是实验性的,并且会在 "experimental::bitwise" 类别中发出警告。

“declared_refs” 特性

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::declared_refs";

此特性允许使用 mystateour 声明对变量的引用,或者使用 local 进行局部化。它主要用于与 "refaliasing" 特性结合使用。有关示例,请参阅 "Declaring a Reference to a Variable" in perlref

此特性从 Perl 5.26 开始可用。

“isa” 特性

这允许使用isa 中缀运算符,它测试左操作数给出的标量是否是右操作数给出的类的对象。有关更多详细信息,请参阅"perlop 中的类实例运算符"

此功能从 Perl 5.32 开始可用。从 Perl 5.32 到 5.34,它被归类为实验性,并且 Perl 在使用它时会发出警告,除非明确禁用。

no warnings "experimental::isa";

从 Perl 5.36 开始,使用此功能不再触发警告(尽管experimental::isa 警告类别仍然存在,以与禁用它的代码兼容)。此功能现在被认为是稳定的,并且由use v5.36(或更高版本)自动启用。

“indirect” 特性

此功能允许对方法调用使用间接对象语法,例如new Foo 1, 2;。它默认启用,但可以关闭以禁止间接对象语法。

此功能从 Perl 5.32 开始以这个名称可用。在以前的版本中,它一直处于开启状态。要禁止(或警告)较旧的 Perl 上的间接对象语法,请参阅indirect CPAN 模块。

“multidimensional” 特性

此功能启用多维数组模拟,这是一个 Perl 4(或更早版本)的功能,用于使用哈希模拟多维数组。这是通过将类似$foo{$x, $y} 的代码转换为$foo{join($;, $x, $y)} 来实现的。它默认启用,但可以关闭以禁用多维数组模拟。

禁用此功能时,通常被替换的语法将报告编译错误。

此功能从 Perl 5.34 开始以这个名称可用。在以前的版本中,它一直处于开启状态。

您可以使用 CPAN 上的multidimensional 模块来禁用较旧版本的 Perl 的多维数组模拟。

“bareword_filehandles” 特性

此功能启用内置函数操作的裸字文件句柄,这是一种通常不鼓励的做法。它默认启用,但可以关闭以禁用裸字文件句柄,除了下面列出的例外情况。

Perl 内置文件句柄STDINSTDOUTSTDERRDATAARGVARGVOUT 和特殊的_ 始终启用。

从 Perl 5.34 开始,此功能以该名称启用。在之前的版本中,它始终处于启用状态。

您可以使用 CPAN 上的 bareword::filehandles 模块来禁用旧版 perl 的裸字文件句柄。

'try' 功能

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::try";

此功能启用 trycatch 语法,允许异常处理,其中从 try 引入的块体中抛出的异常将通过执行 catch 块体来捕获。

有关更多信息,请参阅 "Try Catch Exception Handling" in perlsyn

'defer' 功能

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::defer";

此功能启用 defer 块语法,允许在控制流离开包含它的块时延迟执行代码块。有关更多详细信息,请参阅 "defer" in perlsyn

'extra_paired_delimiters' 功能

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::extra_paired_delimiters";

此功能允许使用比传统的四个配对字符串定界符更多的定界符,< >( ){ },和 [ ]。当此功能启用时,例如,您可以说 qr«pat»

与在 UTF-8 编码的源文件中使用任何非 ASCII 定界符一样,您需要确保解析器将使用诸如 use utf8 之类的声明从 UTF-8 字节解码源代码。

此功能从 Perl 5.36 开始可用。

截至 Unicode 14.0,接受的配对定界符的完整列表为

(  )    U+0028, U+0029   LEFT/RIGHT PARENTHESIS
<  >    U+003C, U+003E   LESS-THAN/GREATER-THAN SIGN
[  ]    U+005B, U+005D   LEFT/RIGHT SQUARE BRACKET
{  }    U+007B, U+007D   LEFT/RIGHT CURLY BRACKET
«  »    U+00AB, U+00BB   LEFT/RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
»  «    U+00BB, U+00AB   RIGHT/LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
܆  ܇    U+0706, U+0707   SYRIAC COLON SKEWED LEFT/RIGHT
༺  ༻    U+0F3A, U+0F3B   TIBETAN MARK GUG RTAGS GYON,  TIBETAN MARK GUG
                         RTAGS GYAS
༼  ༽    U+0F3C, U+0F3D   TIBETAN MARK ANG KHANG GYON,  TIBETAN MARK ANG
                         KHANG GYAS
᚛  ᚜    U+169B, U+169C   OGHAM FEATHER MARK,  OGHAM REVERSED FEATHER MARK
‘  ’    U+2018, U+2019   LEFT/RIGHT SINGLE QUOTATION MARK
’  ‘    U+2019, U+2018   RIGHT/LEFT SINGLE QUOTATION MARK
“  ”    U+201C, U+201D   LEFT/RIGHT DOUBLE QUOTATION MARK
”  “    U+201D, U+201C   RIGHT/LEFT DOUBLE QUOTATION MARK
‵  ′    U+2035, U+2032   REVERSED PRIME,  PRIME
‶  ″    U+2036, U+2033   REVERSED DOUBLE PRIME,  DOUBLE PRIME
‷  ‴    U+2037, U+2034   REVERSED TRIPLE PRIME,  TRIPLE PRIME
‹  ›    U+2039, U+203A   SINGLE LEFT/RIGHT-POINTING ANGLE QUOTATION MARK
›  ‹    U+203A, U+2039   SINGLE RIGHT/LEFT-POINTING ANGLE QUOTATION MARK
⁅  ⁆    U+2045, U+2046   LEFT/RIGHT SQUARE BRACKET WITH QUILL
⁍  ⁌    U+204D, U+204C   BLACK RIGHT/LEFTWARDS BULLET
⁽  ⁾    U+207D, U+207E   SUPERSCRIPT LEFT/RIGHT PARENTHESIS
₍  ₎    U+208D, U+208E   SUBSCRIPT LEFT/RIGHT PARENTHESIS
→  ←    U+2192, U+2190   RIGHT/LEFTWARDS ARROW
↛  ↚    U+219B, U+219A   RIGHT/LEFTWARDS ARROW WITH STROKE
↝  ↜    U+219D, U+219C   RIGHT/LEFTWARDS WAVE ARROW
↠  ↞    U+21A0, U+219E   RIGHT/LEFTWARDS TWO HEADED ARROW
↣  ↢    U+21A3, U+21A2   RIGHT/LEFTWARDS ARROW WITH TAIL
↦  ↤    U+21A6, U+21A4   RIGHT/LEFTWARDS ARROW FROM BAR
↪  ↩    U+21AA, U+21A9   RIGHT/LEFTWARDS ARROW WITH HOOK
↬  ↫    U+21AC, U+21AB   RIGHT/LEFTWARDS ARROW WITH LOOP
↱  ↰    U+21B1, U+21B0   UPWARDS ARROW WITH TIP RIGHT/LEFTWARDS
↳  ↲    U+21B3, U+21B2   DOWNWARDS ARROW WITH TIP RIGHT/LEFTWARDS
⇀  ↼    U+21C0, U+21BC   RIGHT/LEFTWARDS HARPOON WITH BARB UPWARDS
⇁  ↽    U+21C1, U+21BD   RIGHT/LEFTWARDS HARPOON WITH BARB DOWNWARDS
⇉  ⇇    U+21C9, U+21C7   RIGHT/LEFTWARDS PAIRED ARROWS
⇏  ⇍    U+21CF, U+21CD   RIGHT/LEFTWARDS DOUBLE ARROW WITH STROKE
⇒  ⇐    U+21D2, U+21D0   RIGHT/LEFTWARDS DOUBLE ARROW
⇛  ⇚    U+21DB, U+21DA   RIGHT/LEFTWARDS TRIPLE ARROW
⇝  ⇜    U+21DD, U+21DC   RIGHT/LEFTWARDS SQUIGGLE ARROW
⇢  ⇠    U+21E2, U+21E0   RIGHT/LEFTWARDS DASHED ARROW
⇥  ⇤    U+21E5, U+21E4   RIGHT/LEFTWARDS ARROW TO BAR
⇨  ⇦    U+21E8, U+21E6   RIGHT/LEFTWARDS WHITE ARROW
⇴  ⬰    U+21F4, U+2B30   RIGHT/LEFT ARROW WITH SMALL CIRCLE
⇶  ⬱    U+21F6, U+2B31   THREE RIGHT/LEFTWARDS ARROWS
⇸  ⇷    U+21F8, U+21F7   RIGHT/LEFTWARDS ARROW WITH VERTICAL STROKE
⇻  ⇺    U+21FB, U+21FA   RIGHT/LEFTWARDS ARROW WITH DOUBLE VERTICAL
                         STROKE
⇾  ⇽    U+21FE, U+21FD   RIGHT/LEFTWARDS OPEN-HEADED ARROW
∈  ∋    U+2208, U+220B   ELEMENT OF,  CONTAINS AS MEMBER
∉  ∌    U+2209, U+220C   NOT AN ELEMENT OF,  DOES NOT CONTAIN AS MEMBER
∊  ∍    U+220A, U+220D   SMALL ELEMENT OF,  SMALL CONTAINS AS MEMBER
≤  ≥    U+2264, U+2265   LESS-THAN/GREATER-THAN OR EQUAL TO
≦  ≧    U+2266, U+2267   LESS-THAN/GREATER-THAN OVER EQUAL TO
≨  ≩    U+2268, U+2269   LESS-THAN/GREATER-THAN BUT NOT EQUAL TO
≪  ≫    U+226A, U+226B   MUCH LESS-THAN/GREATER-THAN
≮  ≯    U+226E, U+226F   NOT LESS-THAN/GREATER-THAN
≰  ≱    U+2270, U+2271   NEITHER LESS-THAN/GREATER-THAN NOR EQUAL TO
≲  ≳    U+2272, U+2273   LESS-THAN/GREATER-THAN OR EQUIVALENT TO
≴  ≵    U+2274, U+2275   NEITHER LESS-THAN/GREATER-THAN NOR EQUIVALENT TO
≺  ≻    U+227A, U+227B   PRECEDES/SUCCEEDS
≼  ≽    U+227C, U+227D   PRECEDES/SUCCEEDS OR EQUAL TO
≾  ≿    U+227E, U+227F   PRECEDES/SUCCEEDS OR EQUIVALENT TO
⊀  ⊁    U+2280, U+2281   DOES NOT PRECEDE/SUCCEED
⊂  ⊃    U+2282, U+2283   SUBSET/SUPERSET OF
⊄  ⊅    U+2284, U+2285   NOT A SUBSET/SUPERSET OF
⊆  ⊇    U+2286, U+2287   SUBSET/SUPERSET OF OR EQUAL TO
⊈  ⊉    U+2288, U+2289   NEITHER A SUBSET/SUPERSET OF NOR EQUAL TO
⊊  ⊋    U+228A, U+228B   SUBSET/SUPERSET OF WITH NOT EQUAL TO
⊣  ⊢    U+22A3, U+22A2   LEFT/RIGHT TACK
⊦  ⫞    U+22A6, U+2ADE   ASSERTION,  SHORT LEFT TACK
⊨  ⫤    U+22A8, U+2AE4   TRUE,  VERTICAL BAR DOUBLE LEFT TURNSTILE
⊩  ⫣    U+22A9, U+2AE3   FORCES,  DOUBLE VERTICAL BAR LEFT TURNSTILE
⊰  ⊱    U+22B0, U+22B1   PRECEDES/SUCCEEDS UNDER RELATION
⋐  ⋑    U+22D0, U+22D1   DOUBLE SUBSET/SUPERSET
⋖  ⋗    U+22D6, U+22D7   LESS-THAN/GREATER-THAN WITH DOT
⋘  ⋙    U+22D8, U+22D9   VERY MUCH LESS-THAN/GREATER-THAN
⋜  ⋝    U+22DC, U+22DD   EQUAL TO OR LESS-THAN/GREATER-THAN
⋞  ⋟    U+22DE, U+22DF   EQUAL TO OR PRECEDES/SUCCEEDS
⋠  ⋡    U+22E0, U+22E1   DOES NOT PRECEDE/SUCCEED OR EQUAL
⋦  ⋧    U+22E6, U+22E7   LESS-THAN/GREATER-THAN BUT NOT EQUIVALENT TO
⋨  ⋩    U+22E8, U+22E9   PRECEDES/SUCCEEDS BUT NOT EQUIVALENT TO
⋲  ⋺    U+22F2, U+22FA   ELEMENT OF/CONTAINS WITH LONG HORIZONTAL STROKE
⋳  ⋻    U+22F3, U+22FB   ELEMENT OF/CONTAINS WITH VERTICAL BAR AT END OF
                         HORIZONTAL STROKE
⋴  ⋼    U+22F4, U+22FC   SMALL ELEMENT OF/CONTAINS WITH VERTICAL BAR AT
                         END OF HORIZONTAL STROKE
⋶  ⋽    U+22F6, U+22FD   ELEMENT OF/CONTAINS WITH OVERBAR
⋷  ⋾    U+22F7, U+22FE   SMALL ELEMENT OF/CONTAINS WITH OVERBAR
⌈  ⌉    U+2308, U+2309   LEFT/RIGHT CEILING
⌊  ⌋    U+230A, U+230B   LEFT/RIGHT FLOOR
⌦  ⌫    U+2326, U+232B   ERASE TO THE RIGHT/LEFT
⟨ ⟩   U+2329, U+232A   LEFT/RIGHT-POINTING ANGLE BRACKET
⍈  ⍇    U+2348, U+2347   APL FUNCTIONAL SYMBOL QUAD RIGHT/LEFTWARDS ARROW
⏩ ⏪   U+23E9, U+23EA   BLACK RIGHT/LEFT-POINTING DOUBLE TRIANGLE
⏭  ⏮    U+23ED, U+23EE   BLACK RIGHT/LEFT-POINTING DOUBLE TRIANGLE WITH
                         VERTICAL BAR
☛  ☚    U+261B, U+261A   BLACK RIGHT/LEFT POINTING INDEX
☞  ☜    U+261E, U+261C   WHITE RIGHT/LEFT POINTING INDEX
⚞  ⚟    U+269E, U+269F   THREE LINES CONVERGING RIGHT/LEFT
❨  ❩    U+2768, U+2769   MEDIUM LEFT/RIGHT PARENTHESIS ORNAMENT
❪  ❫    U+276A, U+276B   MEDIUM FLATTENED LEFT/RIGHT PARENTHESIS ORNAMENT
❬  ❭    U+276C, U+276D   MEDIUM LEFT/RIGHT-POINTING ANGLE BRACKET
                         ORNAMENT
❮  ❯    U+276E, U+276F   HEAVY LEFT/RIGHT-POINTING ANGLE QUOTATION MARK
                         ORNAMENT
❰  ❱    U+2770, U+2771   HEAVY LEFT/RIGHT-POINTING ANGLE BRACKET ORNAMENT
❲  ❳    U+2772, U+2773   LIGHT LEFT/RIGHT TORTOISE SHELL BRACKET ORNAMENT
❴  ❵    U+2774, U+2775   MEDIUM LEFT/RIGHT CURLY BRACKET ORNAMENT
⟃  ⟄    U+27C3, U+27C4   OPEN SUBSET/SUPERSET
⟅  ⟆    U+27C5, U+27C6   LEFT/RIGHT S-SHAPED BAG DELIMITER
⟈  ⟉    U+27C8, U+27C9   REVERSE SOLIDUS PRECEDING SUBSET,  SUPERSET
                         PRECEDING SOLIDUS
⟞  ⟝    U+27DE, U+27DD   LONG LEFT/RIGHT TACK
⟦  ⟧    U+27E6, U+27E7   MATHEMATICAL LEFT/RIGHT WHITE SQUARE BRACKET
⟨  ⟩    U+27E8, U+27E9   MATHEMATICAL LEFT/RIGHT ANGLE BRACKET
⟪  ⟫    U+27EA, U+27EB   MATHEMATICAL LEFT/RIGHT DOUBLE ANGLE BRACKET
⟬  ⟭    U+27EC, U+27ED   MATHEMATICAL LEFT/RIGHT WHITE TORTOISE SHELL
                         BRACKET
⟮  ⟯    U+27EE, U+27EF   MATHEMATICAL LEFT/RIGHT FLATTENED PARENTHESIS
⟴  ⬲    U+27F4, U+2B32   RIGHT/LEFT ARROW WITH CIRCLED PLUS
⟶  ⟵    U+27F6, U+27F5   LONG RIGHT/LEFTWARDS ARROW
⟹  ⟸    U+27F9, U+27F8   LONG RIGHT/LEFTWARDS DOUBLE ARROW
⟼  ⟻    U+27FC, U+27FB   LONG RIGHT/LEFTWARDS ARROW FROM BAR
⟾  ⟽    U+27FE, U+27FD   LONG RIGHT/LEFTWARDS DOUBLE ARROW FROM BAR
⟿  ⬳    U+27FF, U+2B33   LONG RIGHT/LEFTWARDS SQUIGGLE ARROW
⤀  ⬴    U+2900, U+2B34   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH VERTICAL
                         STROKE
⤁  ⬵    U+2901, U+2B35   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH DOUBLE
                         VERTICAL STROKE
⤃  ⤂    U+2903, U+2902   RIGHT/LEFTWARDS DOUBLE ARROW WITH VERTICAL
                         STROKE
⤅  ⬶    U+2905, U+2B36   RIGHT/LEFTWARDS TWO-HEADED ARROW FROM BAR
⤇  ⤆    U+2907, U+2906   RIGHT/LEFTWARDS DOUBLE ARROW FROM BAR
⤍  ⤌    U+290D, U+290C   RIGHT/LEFTWARDS DOUBLE DASH ARROW
⤏  ⤎    U+290F, U+290E   RIGHT/LEFTWARDS TRIPLE DASH ARROW
⤐  ⬷    U+2910, U+2B37   RIGHT/LEFTWARDS TWO-HEADED TRIPLE DASH ARROW
⤑  ⬸    U+2911, U+2B38   RIGHT/LEFTWARDS ARROW WITH DOTTED STEM
⤔  ⬹    U+2914, U+2B39   RIGHT/LEFTWARDS ARROW WITH TAIL WITH VERTICAL
                         STROKE
⤕  ⬺    U+2915, U+2B3A   RIGHT/LEFTWARDS ARROW WITH TAIL WITH DOUBLE
                         VERTICAL STROKE
⤖  ⬻    U+2916, U+2B3B   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL
⤗  ⬼    U+2917, U+2B3C   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH
                         VERTICAL STROKE
⤘  ⬽    U+2918, U+2B3D   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH
                         DOUBLE VERTICAL STROKE
⤚  ⤙    U+291A, U+2919   RIGHT/LEFTWARDS ARROW-TAIL
⤜  ⤛    U+291C, U+291B   RIGHT/LEFTWARDS DOUBLE ARROW-TAIL
⤞  ⤝    U+291E, U+291D   RIGHT/LEFTWARDS ARROW TO BLACK DIAMOND
⤠  ⤟    U+2920, U+291F   RIGHT/LEFTWARDS ARROW FROM BAR TO BLACK DIAMOND
⤳  ⬿    U+2933, U+2B3F   WAVE ARROW POINTING DIRECTLY RIGHT/LEFT
⤷  ⤶    U+2937, U+2936   ARROW POINTING DOWNWARDS THEN CURVING RIGHT/
                         LEFTWARDS
⥅  ⥆    U+2945, U+2946   RIGHT/LEFTWARDS ARROW WITH PLUS BELOW
⥇  ⬾    U+2947, U+2B3E   RIGHT/LEFTWARDS ARROW THROUGH X
⥓  ⥒    U+2953, U+2952   RIGHT/LEFTWARDS HARPOON WITH BARB UP TO BAR
⥗  ⥖    U+2957, U+2956   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN TO BAR
⥛  ⥚    U+295B, U+295A   RIGHT/LEFTWARDS HARPOON WITH BARB UP FROM BAR
⥟  ⥞    U+295F, U+295E   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN FROM BAR
⥤  ⥢    U+2964, U+2962   RIGHT/LEFTWARDS HARPOON WITH BARB UP ABOVE
                         RIGHT/LEFTWARDS HARPOON WITH BARB DOWN
⥬  ⥪    U+296C, U+296A   RIGHT/LEFTWARDS HARPOON WITH BARB UP ABOVE LONG
                         DASH
⥭  ⥫    U+296D, U+296B   RIGHT/LEFTWARDS HARPOON WITH BARB DOWN BELOW
                         LONG DASH
⥱  ⭀    U+2971, U+2B40   EQUALS SIGN ABOVE RIGHT/LEFTWARDS ARROW
⥲  ⭁    U+2972, U+2B41   TILDE OPERATOR ABOVE RIGHTWARDS ARROW,  REVERSE
                         TILDE OPERATOR ABOVE LEFTWARDS ARROW
⥴  ⭋    U+2974, U+2B4B   RIGHTWARDS ARROW ABOVE TILDE OPERATOR,
                         LEFTWARDS ARROW ABOVE REVERSE TILDE OPERATOR
⥵  ⭂    U+2975, U+2B42   RIGHTWARDS ARROW ABOVE ALMOST EQUAL TO,
                         LEFTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO
⥹  ⥻    U+2979, U+297B   SUBSET/SUPERSET ABOVE RIGHT/LEFTWARDS ARROW
⦃  ⦄    U+2983, U+2984   LEFT/RIGHT WHITE CURLY BRACKET
⦅  ⦆    U+2985, U+2986   LEFT/RIGHT WHITE PARENTHESIS
⦇  ⦈    U+2987, U+2988   Z NOTATION LEFT/RIGHT IMAGE BRACKET
⦉  ⦊    U+2989, U+298A   Z NOTATION LEFT/RIGHT BINDING BRACKET
⦋  ⦌    U+298B, U+298C   LEFT/RIGHT SQUARE BRACKET WITH UNDERBAR
⦍  ⦐    U+298D, U+2990   LEFT/RIGHT SQUARE BRACKET WITH TICK IN TOP
                         CORNER
⦏  ⦎    U+298F, U+298E   LEFT/RIGHT SQUARE BRACKET WITH TICK IN BOTTOM
                         CORNER
⦑  ⦒    U+2991, U+2992   LEFT/RIGHT ANGLE BRACKET WITH DOT
⦓  ⦔    U+2993, U+2994   LEFT/RIGHT ARC LESS-THAN/GREATER-THAN BRACKET
⦕  ⦖    U+2995, U+2996   DOUBLE LEFT/RIGHT ARC GREATER-THAN/LESS-THAN
                         BRACKET
⦗  ⦘    U+2997, U+2998   LEFT/RIGHT BLACK TORTOISE SHELL BRACKET
⦨  ⦩    U+29A8, U+29A9   MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW
                         POINTING UP AND RIGHT/LEFT
⦪  ⦫    U+29AA, U+29AB   MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW
                         POINTING DOWN AND RIGHT/LEFT
⦳  ⦴    U+29B3, U+29B4   EMPTY SET WITH RIGHT/LEFT ARROW ABOVE
⧀  ⧁    U+29C0, U+29C1   CIRCLED LESS-THAN/GREATER-THAN
⧘  ⧙    U+29D8, U+29D9   LEFT/RIGHT WIGGLY FENCE
⧚  ⧛    U+29DA, U+29DB   LEFT/RIGHT DOUBLE WIGGLY FENCE
⧼  ⧽    U+29FC, U+29FD   LEFT/RIGHT-POINTING CURVED ANGLE BRACKET
⩹  ⩺    U+2A79, U+2A7A   LESS-THAN/GREATER-THAN WITH CIRCLE INSIDE
⩻  ⩼    U+2A7B, U+2A7C   LESS-THAN/GREATER-THAN WITH QUESTION MARK ABOVE
⩽  ⩾    U+2A7D, U+2A7E   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO
⩿  ⪀    U+2A7F, U+2A80   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
                         DOT INSIDE
⪁  ⪂    U+2A81, U+2A82   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
                         DOT ABOVE
⪃  ⪄    U+2A83, U+2A84   LESS-THAN/GREATER-THAN OR SLANTED EQUAL TO WITH
                         DOT ABOVE RIGHT/LEFT
⪅  ⪆    U+2A85, U+2A86   LESS-THAN/GREATER-THAN OR APPROXIMATE
⪇  ⪈    U+2A87, U+2A88   LESS-THAN/GREATER-THAN AND SINGLE-LINE NOT
                         EQUAL TO
⪉  ⪊    U+2A89, U+2A8A   LESS-THAN/GREATER-THAN AND NOT APPROXIMATE
⪍  ⪎    U+2A8D, U+2A8E   LESS-THAN/GREATER-THAN ABOVE SIMILAR OR EQUAL
⪕  ⪖    U+2A95, U+2A96   SLANTED EQUAL TO OR LESS-THAN/GREATER-THAN
⪗  ⪘    U+2A97, U+2A98   SLANTED EQUAL TO OR LESS-THAN/GREATER-THAN WITH
                         DOT INSIDE
⪙  ⪚    U+2A99, U+2A9A   DOUBLE-LINE EQUAL TO OR LESS-THAN/GREATER-THAN
⪛  ⪜    U+2A9B, U+2A9C   DOUBLE-LINE SLANTED EQUAL TO OR LESS-THAN/
                         GREATER-THAN
⪝  ⪞    U+2A9D, U+2A9E   SIMILAR OR LESS-THAN/GREATER-THAN
⪟  ⪠    U+2A9F, U+2AA0   SIMILAR ABOVE LESS-THAN/GREATER-THAN ABOVE
                         EQUALS SIGN
⪡  ⪢    U+2AA1, U+2AA2   DOUBLE NESTED LESS-THAN/GREATER-THAN
⪦  ⪧    U+2AA6, U+2AA7   LESS-THAN/GREATER-THAN CLOSED BY CURVE
⪨  ⪩    U+2AA8, U+2AA9   LESS-THAN/GREATER-THAN CLOSED BY CURVE ABOVE
                         SLANTED EQUAL
⪪  ⪫    U+2AAA, U+2AAB   SMALLER THAN/LARGER THAN
⪬  ⪭    U+2AAC, U+2AAD   SMALLER THAN/LARGER THAN OR EQUAL TO
⪯  ⪰    U+2AAF, U+2AB0   PRECEDES/SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN
⪱  ⪲    U+2AB1, U+2AB2   PRECEDES/SUCCEEDS ABOVE SINGLE-LINE NOT EQUAL TO
⪳  ⪴    U+2AB3, U+2AB4   PRECEDES/SUCCEEDS ABOVE EQUALS SIGN
⪵  ⪶    U+2AB5, U+2AB6   PRECEDES/SUCCEEDS ABOVE NOT EQUAL TO
⪷  ⪸    U+2AB7, U+2AB8   PRECEDES/SUCCEEDS ABOVE ALMOST EQUAL TO
⪹  ⪺    U+2AB9, U+2ABA   PRECEDES/SUCCEEDS ABOVE NOT ALMOST EQUAL TO
⪻  ⪼    U+2ABB, U+2ABC   DOUBLE PRECEDES/SUCCEEDS
⪽  ⪾    U+2ABD, U+2ABE   SUBSET/SUPERSET WITH DOT
⪿  ⫀    U+2ABF, U+2AC0   SUBSET/SUPERSET WITH PLUS SIGN BELOW
⫁  ⫂    U+2AC1, U+2AC2   SUBSET/SUPERSET WITH MULTIPLICATION SIGN BELOW
⫃  ⫄    U+2AC3, U+2AC4   SUBSET/SUPERSET OF OR EQUAL TO WITH DOT ABOVE
⫅  ⫆    U+2AC5, U+2AC6   SUBSET/SUPERSET OF ABOVE EQUALS SIGN
⫇  ⫈    U+2AC7, U+2AC8   SUBSET/SUPERSET OF ABOVE TILDE OPERATOR
⫉  ⫊    U+2AC9, U+2ACA   SUBSET/SUPERSET OF ABOVE ALMOST EQUAL TO
⫋  ⫌    U+2ACB, U+2ACC   SUBSET/SUPERSET OF ABOVE NOT EQUAL TO
⫏  ⫐    U+2ACF, U+2AD0   CLOSED SUBSET/SUPERSET
⫑  ⫒    U+2AD1, U+2AD2   CLOSED SUBSET/SUPERSET OR EQUAL TO
⫕  ⫖    U+2AD5, U+2AD6   SUBSET/SUPERSET ABOVE SUBSET/SUPERSET
⫥  ⊫    U+2AE5, U+22AB   DOUBLE VERTICAL BAR DOUBLE LEFT/RIGHT TURNSTILE
⫷  ⫸    U+2AF7, U+2AF8   TRIPLE NESTED LESS-THAN/GREATER-THAN
⫹  ⫺    U+2AF9, U+2AFA   DOUBLE-LINE SLANTED LESS-THAN/GREATER-THAN OR
                         EQUAL TO
⭆  ⭅    U+2B46, U+2B45   RIGHT/LEFTWARDS QUADRUPLE ARROW
⭇  ⭉    U+2B47, U+2B49   REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW,
                         TILDE OPERATOR ABOVE LEFTWARDS ARROW
⭈  ⭊    U+2B48, U+2B4A   RIGHTWARDS ARROW ABOVE REVERSE ALMOST EQUAL
                         TO,  LEFTWARDS ARROW ABOVE ALMOST EQUAL TO
⭌  ⥳    U+2B4C, U+2973   RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR,
                         LEFTWARDS ARROW ABOVE TILDE OPERATOR
⭢  ⭠    U+2B62, U+2B60   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW
⭬  ⭪    U+2B6C, U+2B6A   RIGHT/LEFTWARDS TRIANGLE-HEADED DASHED ARROW
⭲  ⭰    U+2B72, U+2B70   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW TO BAR
⭼  ⭺    U+2B7C, U+2B7A   RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
                         DOUBLE VERTICAL STROKE
⮆  ⮄    U+2B86, U+2B84   RIGHT/LEFTWARDS TRIANGLE-HEADED PAIRED ARROWS
⮊  ⮈    U+2B8A, U+2B88   RIGHT/LEFTWARDS BLACK CIRCLED WHITE ARROW
⮕  ⬅    U+2B95, U+2B05   RIGHT/LEFTWARDS BLACK ARROW
⮚  ⮘    U+2B9A, U+2B98   THREE-D TOP-LIGHTED RIGHT/LEFTWARDS EQUILATERAL
                         ARROWHEAD
⮞  ⮜    U+2B9E, U+2B9C   BLACK RIGHT/LEFTWARDS EQUILATERAL ARROWHEAD
⮡  ⮠    U+2BA1, U+2BA0   DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP
                         RIGHT/LEFTWARDS
⮣  ⮢    U+2BA3, U+2BA2   UPWARDS TRIANGLE-HEADED ARROW WITH LONG TIP
                         RIGHT/LEFTWARDS
⮩  ⮨    U+2BA9, U+2BA8   BLACK CURVED DOWNWARDS AND RIGHT/LEFTWARDS ARROW
⮫  ⮪    U+2BAB, U+2BAA   BLACK CURVED UPWARDS AND RIGHT/LEFTWARDS ARROW
⮱  ⮰    U+2BB1, U+2BB0   RIBBON ARROW DOWN RIGHT/LEFT
⮳  ⮲    U+2BB3, U+2BB2   RIBBON ARROW UP RIGHT/LEFT
⯮  ⯬    U+2BEE, U+2BEC   RIGHT/LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE
                         ARROWHEADS
⸂  ⸃    U+2E02, U+2E03   LEFT/RIGHT SUBSTITUTION BRACKET
⸃  ⸂    U+2E03, U+2E02   RIGHT/LEFT SUBSTITUTION BRACKET
⸄  ⸅    U+2E04, U+2E05   LEFT/RIGHT DOTTED SUBSTITUTION BRACKET
⸅  ⸄    U+2E05, U+2E04   RIGHT/LEFT DOTTED SUBSTITUTION BRACKET
⸉  ⸊    U+2E09, U+2E0A   LEFT/RIGHT TRANSPOSITION BRACKET
⸊  ⸉    U+2E0A, U+2E09   RIGHT/LEFT TRANSPOSITION BRACKET
⸌  ⸍    U+2E0C, U+2E0D   LEFT/RIGHT RAISED OMISSION BRACKET
⸍  ⸌    U+2E0D, U+2E0C   RIGHT/LEFT RAISED OMISSION BRACKET
⸑  ⸐    U+2E11, U+2E10   REVERSED FORKED PARAGRAPHOS,  FORKED PARAGRAPHOS
⸜  ⸝    U+2E1C, U+2E1D   LEFT/RIGHT LOW PARAPHRASE BRACKET
⸝  ⸜    U+2E1D, U+2E1C   RIGHT/LEFT LOW PARAPHRASE BRACKET
⸠  ⸡    U+2E20, U+2E21   LEFT/RIGHT VERTICAL BAR WITH QUILL
⸡  ⸠    U+2E21, U+2E20   RIGHT/LEFT VERTICAL BAR WITH QUILL
⸢  ⸣    U+2E22, U+2E23   TOP LEFT/RIGHT HALF BRACKET
⸤  ⸥    U+2E24, U+2E25   BOTTOM LEFT/RIGHT HALF BRACKET
⸦  ⸧    U+2E26, U+2E27   LEFT/RIGHT SIDEWAYS U BRACKET
⸨  ⸩    U+2E28, U+2E29   LEFT/RIGHT DOUBLE PARENTHESIS
⸶  ⸷    U+2E36, U+2E37   DAGGER WITH LEFT/RIGHT GUARD
⹂  „    U+2E42, U+201E   DOUBLE LOW-REVERSED-9 QUOTATION MARK,  DOUBLE
                         LOW-9 QUOTATION MARK
⹕  ⹖    U+2E55, U+2E56   LEFT/RIGHT SQUARE BRACKET WITH STROKE
⹗  ⹘    U+2E57, U+2E58   LEFT/RIGHT SQUARE BRACKET WITH DOUBLE STROKE
⹙  ⹚    U+2E59, U+2E5A   TOP HALF LEFT/RIGHT PARENTHESIS
⹛  ⹜    U+2E5B, U+2E5C   BOTTOM HALF LEFT/RIGHT PARENTHESIS
〈 〉   U+3008, U+3009   LEFT/RIGHT ANGLE BRACKET
《 》   U+300A, U+300B   LEFT/RIGHT DOUBLE ANGLE BRACKET
「 」   U+300C, U+300D   LEFT/RIGHT CORNER BRACKET
『 』   U+300E, U+300F   LEFT/RIGHT WHITE CORNER BRACKET
【 】   U+3010, U+3011   LEFT/RIGHT BLACK LENTICULAR BRACKET
〔 〕   U+3014, U+3015   LEFT/RIGHT TORTOISE SHELL BRACKET
〖 〗   U+3016, U+3017   LEFT/RIGHT WHITE LENTICULAR BRACKET
〘 〙   U+3018, U+3019   LEFT/RIGHT WHITE TORTOISE SHELL BRACKET
〚 〛   U+301A, U+301B   LEFT/RIGHT WHITE SQUARE BRACKET
〝 〞   U+301D, U+301E   REVERSED DOUBLE PRIME QUOTATION MARK,  DOUBLE
                         PRIME QUOTATION MARK
꧁  ꧂    U+A9C1, U+A9C2   JAVANESE LEFT/RIGHT RERENGGAN
﴾  ﴿    U+FD3E, U+FD3F   ORNATE LEFT/RIGHT PARENTHESIS
﹙ ﹚   U+FE59, U+FE5A   SMALL LEFT/RIGHT PARENTHESIS
﹛ ﹜   U+FE5B, U+FE5C   SMALL LEFT/RIGHT CURLY BRACKET
﹝ ﹞   U+FE5D, U+FE5E   SMALL LEFT/RIGHT TORTOISE SHELL BRACKET
﹤ ﹥   U+FE64, U+FE65   SMALL LESS-THAN/GREATER-THAN SIGN
( )   U+FF08, U+FF09   FULLWIDTH LEFT/RIGHT PARENTHESIS
< >   U+FF1C, U+FF1E   FULLWIDTH LESS-THAN/GREATER-THAN SIGN
[ ]   U+FF3B, U+FF3D   FULLWIDTH LEFT/RIGHT SQUARE BRACKET
{ }   U+FF5B, U+FF5D   FULLWIDTH LEFT/RIGHT CURLY BRACKET
⦅ ⦆   U+FF5F, U+FF60   FULLWIDTH LEFT/RIGHT WHITE PARENTHESIS
「  」    U+FF62, U+FF63   HALFWIDTH LEFT/RIGHT CORNER BRACKET
→  ←    U+FFEB, U+FFE9   HALFWIDTH RIGHT/LEFTWARDS ARROW
𝄃  𝄂    U+1D103, U+1D102 MUSICAL SYMBOL REVERSE FINAL BARLINE,  MUSICAL
                         SYMBOL FINAL BARLINE
𝄆  𝄇    U+1D106, U+1D107 MUSICAL SYMBOL LEFT/RIGHT REPEAT SIGN
👉 👈   U+1F449, U+1F448 WHITE RIGHT/LEFT POINTING BACKHAND INDEX
🔈 🕨    U+1F508, U+1F568 SPEAKER,  RIGHT SPEAKER
🔉 🕩    U+1F509, U+1F569 SPEAKER WITH ONE SOUND WAVE,  RIGHT SPEAKER WITH
                         ONE SOUND WAVE
🔊 🕪    U+1F50A, U+1F56A SPEAKER WITH THREE SOUND WAVES,  RIGHT SPEAKER
                         WITH THREE SOUND WAVES
🕻  🕽    U+1F57B, U+1F57D LEFT/RIGHT HAND TELEPHONE RECEIVER
🖙  🖘    U+1F599, U+1F598 SIDEWAYS WHITE RIGHT/LEFT POINTING INDEX
🖛  🖚    U+1F59B, U+1F59A SIDEWAYS BLACK RIGHT/LEFT POINTING INDEX
🖝  🖜    U+1F59D, U+1F59C BLACK RIGHT/LEFT POINTING BACKHAND INDEX
🗦  🗧    U+1F5E6, U+1F5E7 THREE RAYS LEFT/RIGHT
🠂  🠀    U+1F802, U+1F800 RIGHT/LEFTWARDS ARROW WITH SMALL TRIANGLE
                         ARROWHEAD
🠆  🠄    U+1F806, U+1F804 RIGHT/LEFTWARDS ARROW WITH MEDIUM TRIANGLE
                         ARROWHEAD
🠊  🠈    U+1F80A, U+1F808 RIGHT/LEFTWARDS ARROW WITH LARGE TRIANGLE
                         ARROWHEAD
🠒  🠐    U+1F812, U+1F810 RIGHT/LEFTWARDS ARROW WITH SMALL EQUILATERAL
                         ARROWHEAD
🠖  🠔    U+1F816, U+1F814 RIGHT/LEFTWARDS ARROW WITH EQUILATERAL ARROWHEAD
🠚  🠘    U+1F81A, U+1F818 HEAVY RIGHT/LEFTWARDS ARROW WITH EQUILATERAL
                         ARROWHEAD
🠞  🠜    U+1F81E, U+1F81C HEAVY RIGHT/LEFTWARDS ARROW WITH LARGE
                         EQUILATERAL ARROWHEAD
🠢  🠠    U+1F822, U+1F820 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
                         NARROW SHAFT
🠦  🠤    U+1F826, U+1F824 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
                         MEDIUM SHAFT
🠪  🠨    U+1F82A, U+1F828 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH BOLD
                         SHAFT
🠮  🠬    U+1F82E, U+1F82C RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH
                         HEAVY SHAFT
🠲  🠰    U+1F832, U+1F830 RIGHT/LEFTWARDS TRIANGLE-HEADED ARROW WITH VERY
                         HEAVY SHAFT
🠶  🠴    U+1F836, U+1F834 RIGHT/LEFTWARDS FINGER-POST ARROW
🠺  🠸    U+1F83A, U+1F838 RIGHT/LEFTWARDS SQUARED ARROW
🠾  🠼    U+1F83E, U+1F83C RIGHT/LEFTWARDS COMPRESSED ARROW
🡂  🡀    U+1F842, U+1F840 RIGHT/LEFTWARDS HEAVY COMPRESSED ARROW
🡆  🡄    U+1F846, U+1F844 RIGHT/LEFTWARDS HEAVY ARROW
🡒  🡐    U+1F852, U+1F850 RIGHT/LEFTWARDS SANS-SERIF ARROW
🡢  🡠    U+1F862, U+1F860 WIDE-HEADED RIGHT/LEFTWARDS LIGHT BARB ARROW
🡪  🡨    U+1F86A, U+1F868 WIDE-HEADED RIGHT/LEFTWARDS BARB ARROW
🡲  🡰    U+1F872, U+1F870 WIDE-HEADED RIGHT/LEFTWARDS MEDIUM BARB ARROW
🡺  🡸    U+1F87A, U+1F878 WIDE-HEADED RIGHT/LEFTWARDS HEAVY BARB ARROW
🢂  🢀    U+1F882, U+1F880 WIDE-HEADED RIGHT/LEFTWARDS VERY HEAVY BARB
                         ARROW
🢒  🢐    U+1F892, U+1F890 RIGHT/LEFTWARDS TRIANGLE ARROWHEAD
🢖  🢔    U+1F896, U+1F894 RIGHT/LEFTWARDS WHITE ARROW WITHIN TRIANGLE
                         ARROWHEAD
🢚  🢘    U+1F89A, U+1F898 RIGHT/LEFTWARDS ARROW WITH NOTCHED TAIL
🢡  🢠    U+1F8A1, U+1F8A0 RIGHTWARDS BOTTOM SHADED WHITE ARROW,
                         LEFTWARDS BOTTOM-SHADED WHITE ARROW
🢣  🢢    U+1F8A3, U+1F8A2 RIGHT/LEFTWARDS TOP SHADED WHITE ARROW
🢥  🢦    U+1F8A5, U+1F8A6 RIGHT/LEFTWARDS RIGHT-SHADED WHITE ARROW
🢧  🢤    U+1F8A7, U+1F8A4 RIGHT/LEFTWARDS LEFT-SHADED WHITE ARROW
🢩  🢨    U+1F8A9, U+1F8A8 RIGHT/LEFTWARDS BACK-TILTED SHADOWED WHITE ARROW
🢫  🢪    U+1F8AB, U+1F8AA RIGHT/LEFTWARDS FRONT-TILTED SHADOWED WHITE
                         ARROW

'module_true' 功能

此功能消除了使用 requireuse 加载的模块在末尾返回真值的必要性。编译期间的任何错误都会导致失败,但当此功能生效时,到达模块末尾将阻止 perl 抛出模块“未返回真值”的异常。

'class' 特性

警告:此特性仍处于实验阶段,其实现可能会在未来版本的 Perl 中更改或删除。出于这个原因,除非您已明确禁用警告,否则 Perl 会在您使用此特性时发出警告。

no warnings "experimental::class";

此特性启用 class 块语法和其他相关关键字,这些关键字实现了“新”对象系统,之前代号为“Corinna”。

特性捆绑

可以使用特性捆绑将多个特性一起加载。特性捆绑的名称以冒号开头,以区别于实际的特性。

use feature ":5.10";

以下特性捆绑可用

bundle    features included
--------- -----------------
:default  indirect multidimensional
          bareword_filehandles

:5.10     bareword_filehandles indirect
          multidimensional say state switch

:5.12     bareword_filehandles indirect
          multidimensional say state switch
          unicode_strings

:5.14     bareword_filehandles indirect
          multidimensional say state switch
          unicode_strings

:5.16     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional say state
          switch unicode_eval unicode_strings

:5.18     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional say state
          switch unicode_eval unicode_strings

:5.20     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional say state
          switch unicode_eval unicode_strings

:5.22     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional say state
          switch unicode_eval unicode_strings

:5.24     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional postderef_qq
          say state switch unicode_eval
          unicode_strings

:5.26     bareword_filehandles current_sub evalbytes
          fc indirect multidimensional postderef_qq
          say state switch unicode_eval
          unicode_strings

:5.28     bareword_filehandles bitwise current_sub
          evalbytes fc indirect multidimensional
          postderef_qq say state switch unicode_eval
          unicode_strings

:5.30     bareword_filehandles bitwise current_sub
          evalbytes fc indirect multidimensional
          postderef_qq say state switch unicode_eval
          unicode_strings

:5.32     bareword_filehandles bitwise current_sub
          evalbytes fc indirect multidimensional
          postderef_qq say state switch unicode_eval
          unicode_strings

:5.34     bareword_filehandles bitwise current_sub
          evalbytes fc indirect multidimensional
          postderef_qq say state switch unicode_eval
          unicode_strings

:5.36     bareword_filehandles bitwise current_sub
          evalbytes fc isa postderef_qq say signatures
          state unicode_eval unicode_strings

:5.38     bitwise current_sub evalbytes fc isa
          module_true postderef_qq say signatures
          state unicode_eval unicode_strings

:default 捆绑代表在任何 use featureno feature 声明之前启用的特性集。

指定子版本(例如 5.14.0 中的 0)在特性捆绑中没有效果。特性捆绑保证在所有子版本中都相同。

use feature ":5.14.0";    # same as ":5.14"
use feature ":5.14.1";    # same as ":5.14"

隐式加载

与其通过名称加载特性捆绑,不如让 Perl 为您隐式加载特性捆绑更容易。

有两种方法可以隐式加载 feature pragma

检查特性

feature 提供了一些简单的 API 来检查哪些特性已启用。

这些函数无法导入,必须通过其完全限定名称调用。如果您不需要设置特性,则需要确保使用以下方法加载 feature

use feature ();
feature_enabled($feature)
feature_enabled($feature, $depth)
package MyStandardEnforcer;
use feature ();
use Carp "croak";
sub import {
  croak "disable indirect!" if feature::feature_enabled("indirect");
}

测试在调用堆栈的给定级别上是否启用了命名特性,如果已启用则返回真值。$depth 默认为 1,它检查调用 feature::feature_enabled() 的范围的范围。

对于未知的特性名称,会抛出异常。

features_enabled()
features_enabled($depth)
package ReportEnabledFeatures;
use feature "say";
sub import {
  say STDERR join " ", feature::features_enabled();
}

返回在调用堆栈的给定级别上启用的特性的列表。$depth 默认为 1,它检查调用 feature::features_enabled() 的范围的范围。

feature_bundle()
feature_bundle($depth)

返回调用堆栈中指定级别所选的特性包,如果有的话。$depth 默认值为 1,它检查调用 feature::feature_bundle() 的作用域。

如果作用域中没有选择特性包,则返回未定义值。

返回的包名称将是与所选包匹配的最早包,因此

use feature ();
use v5.12;
BEGIN { print feature::feature_bundle(0); }

将打印 5.11

这返回内部状态,目前 use v5.12; 设置特性包,但 use feature ":5.12"; 不会设置特性包。这可能会在 Perl 的未来版本中发生变化。