Perl6/Rakudo 是否已经存在类似于 perl5 的“perldoc -f function_name”之类的内置函数,它给了我一个简短而快速的使用说明?
4 回答
嗯...这可能不是您想要的,但是:
Perl6::Doc - 命令行中所有有用的 Perl 6 文档
这包括p6doc
命令行实用程序,可用于读取概要:
p6doc s05 # Browse Synopsis 05
完整的概要列表可在此处获得:http: //perlcabal.org/syn/;Perl 6 的内置函数是 s29:http ://perlcabal.org/syn/S29.html
不过,我从未见过像perldoc -f fname
.
此外,在相关说明中,还有Perl 6 运算符的周期表
perl --doc 实际上是一个红鲱鱼。
命令是“p6doc”
% p6doc
What documentation do you want to read?
Examples: p6doc Type::Str
p6doc Type::Str.split
You can also look up specific method/routine definitions:
p6doc -f push
不幸的是,Perl6没有附带perldoc命令。(实际上就像 Perl 5 一样,尽管除了 Debian 之外的大多数 Linux 发行版都带有功能性 perldoc)。
所以你必须安装它。
按照 Perl6 文档 ( https://docs.perl6.org/programs/02-reading-docs
),您必须对它进行 zef。
zef install p6doc
...在我的Centos上,它不起作用,因为p6doc安装在 rakudo 文件夹中,而不是 bin 目录中,groumpf。
So I ln it also :)
ln -s /opt/rakudo-pkg/share/perl6/site/bin/p6doc /usr/bin
Enjoy now, life in Perl world is always better with a perldoc at hand.