使用-v
开关,我获得了鹦鹉svn修订版本:
$ perl6 -v
This compiler is built with the Parrot Compiler Toolkit, parrot revision 45822.
但是我怎么知道 rakudo 版本,无论是 vx.xx
还是 {some-git-hash}
?
谢谢!
$*PERL
可以提供提示。> $*PERL.compiler
rakudo (2018.04.1)
> $*PERL.compiler.^attributes
(Str $!id Str $!release Str $!build-date Str $!codename Str $!name Str $!auth Version $!version Blob $!signature Str $!desc)
> $*PERL.compiler.^methods'
(BUILD build-date verbose-config Str gist id release codename name auth version signature desc BUILDALL)
> $*PERL.compiler.name
rakudo
> $*PERL.compiler.version
v2018.04.1
> $*PERL.compiler.auth
The Perl Foundation
> $*PERL.compiler.build-date # This being the date it was built on my machine
2018-05-18T21:59:11Z
> $*PERL.compiler.verbose-config
...
目前你无法知道 :(
在RT中有一个补丁等待审核:http://rt.perl.org/rt3/Ticket/Display.html?id=73148,但是到目前为止还没有应用。
更新:使用足够新的Rakudo,您将获得:
$ perl6 -v
This is Rakudo Perl 6, version 2010.06-212-g1086ff8
Copyright 2008-2010, The Perl Foundation
“version”之后的内容是git describe
命令的输出结果。
现在perl6 -v已经可以使用了。它提供了最新的月度发布版本,自那时以来的提交次数和git哈希值。