gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 19:54:52 25 4
gpt4 key购买 nike

perldoc -f 使用
函数使用的语法:

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

但在这种情况下:

use Test::More tests => 5;

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

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

如何在声明后使用此参数tests

最佳答案

是的,就是提到的 LIST - => 只是一种奇特的写法:

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

加载模块后依次调用 Test::More->import("tests", 5)

关于perl - 在 Perl 的 Test::More 中声明后如何使用参数 `tests`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3670408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com