Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl:what';包括在使用中?_Perl - Fatal编程技术网

Perl:what';包括在使用中?

Perl:what';包括在使用中?,perl,Perl,我见过几个州使用5.12.0默认启用某些特性/杂注(例如,使用strict;)。另一个例子是,使用5.14.0是 最适合Unicode字符串功能UTF-8处理 我似乎想起了一个可用的use声明,该声明提供了某些默认值(例如use strict;use warnings;use diagnostics;),但记不起具体内容。如何找出给定的中包含的内容使用5.#语句?例如,使用了什么5.22.0默认提供使用严格?这记录在: 可以使用功能包将多个功能加载到一起。要素束的名称以冒号作为前缀,以区别于实际

我见过几个州
使用5.12.0默认启用某些特性/杂注(例如,
使用strict;
)。另一个例子是,
使用5.14.0

最适合Unicode字符串功能UTF-8处理

我似乎想起了一个可用的
use
声明,该声明提供了某些默认值(例如
use strict;use warnings;use diagnostics;
),但记不起具体内容。如何找出给定的
中包含的内容使用5.#语句?例如,
使用了什么5.22.0默认提供<代码>使用严格

这记录在:

可以使用功能包将多个功能加载到一起。要素束的名称以冒号作为前缀,以区别于实际要素

use feature ":5.10";
以下功能包可用:

bundle    features included
--------- -----------------
:default  array_base
:5.10     say state switch array_base
:5.12     say state switch unicode_strings array_base
:5.14     say state switch unicode_strings array_base
:5.16     say state switch unicode_strings
          unicode_eval evalbytes current_sub fc
:5.18     say state switch unicode_strings
          unicode_eval evalbytes current_sub fc
:5.20     say state switch unicode_strings
          unicode_eval evalbytes current_sub fc
:5.22     say state switch unicode_strings
          unicode_eval evalbytes current_sub fc
在哪里

我会做一个暗示

no feature ':all';
use feature ':5.10';
等等

狭窄的自动启用记录在:

如果指定的Perl版本大于或等于5.12.0,则会像
使用strict
一样启用词汇限制


使用5.12.0是否使用功能“:5.12”,所以您可以

  • 陈述
  • 开关
  • unicode_字符串
  • 基阵

功能包在的文档中有说明。

对于未包含的增强功能,您可以使用。

完美。这正是我想要的。是我想象出来的,还是有一些
功能
子集,包括:狭窄、警告和诊断,一气呵成?谢天谢地,据我所知,内核中并没有这样做的东西,但肯定有一些模块可以做到这一点。也许您正在考虑,它启用了
严格
警告
,以及所有5.10功能。啊,是的,就是这样!现代::Perl。再次感谢features.pm的文档链接,我想不起来了。保留书签的伟大资源非常有趣的模块!
no feature ':all';
use feature ':5.10';