模块依赖性:是否可以设置最小版本?

sid*_*com 6 module version perl6

是否可以向文件depend部分中列出的模块添加最低版本META6.json

jjm*_*elo 6

它使用的语法相同Version。例如,您可以使用,v1.0+或在META6.json中使用“ 1.0+”


uge*_*exe 5

To declare a dependency on Foo of version 1 or higher one would do the same as if one was asking zef to install Foo:ver<1.0+>:

zef install "Foo:ver<1.0+>"
Run Code Online (Sandbox Code Playgroud)
"depends" : [
    "Foo:ver<1.0+>"
]
Run Code Online (Sandbox Code Playgroud)

Long form identities use version literals for api and ver attributes, and strings for any other (such as auth, file, name, etc). So to describe such a dependency you should write it the same way you would if you were useing it using the literal form :foo<...> ala use Test:ver<6.d+>. This is opposed to :foo(...) form which can run anything, e.g. use Test:ver(do { say 42; v6.d+ }), which would allow arbitrary code execution by just searching for dependencies and thus is not a valid way to describe something in a META6.json