如何在Perl的Test :: More中声明后使用参数`tests`?

前端之家收集整理的这篇文章主要介绍了如何在Perl的Test :: More中声明后使用参数`tests`?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
来自perldoc -f使用
函数的语法用法

use Module VERSION LIST
   use Module VERSION
   use Module LIST
   use Module
   use VERSION

但在这种情况下:

use Test::More tests => 5;

(它将测试次数设置为5)

什么是表达式测试的数据类型=> 5?
是LIST还是其他什么?

如何在声明后使用此参数测试?

解决方法

是的,这是提到的列表 – =>写这个只是一种奇特的方式:

use Test::More ("tests",5);

在加载模块后,它又调用Test :: More-> import(“tests”,5).

猜你在找的Perl相关文章