开发者

How to know the version of perl6/raku I am running?

Trying the -v switch, I get the parrot svn revision:

$ perl6 -v
This compiler is built with the Parrot Compiler Toolkit, parrot revision 45822.

but how do I know the 开发者_JS百科rakudo version, either a vx.xx or {some-git-hash}?

Thanks,


The special variable $*PERL may provide the hint

> $*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
...


Currently you can't know :(

There's a patch for that in RT that awaits review: http://rt.perl.org/rt3/Ticket/Display.html?id=73148 but so far it hasn't been applied yet.

Update: With a sufficiently new Rakudo, you get:

$ perl6 -v

This is Rakudo Perl 6, version 2010.06-212-g1086ff8

Copyright 2008-2010, The Perl Foundation

Where the thing after "version" is the git describe output.


perl6 -v now works. It provides the last monthly release, the number of commits since then, and the git hash.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜