“perldoc -f”适用于 Perl6/Rakudo

发布于 2024-10-08 16:57:51 字数 86 浏览 0 评论 0原文

Perl6/Rakudo 是否已经存在像 perl5 的“perldoc -f function_name”这样的内置函数,它给了我一个简短而快速的使用说明?

Does for Perl6/Rakudo already exist something like perl5's "perldoc -f function_name" for build-in-functions which gives me a short and quick usage instruction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

度的依靠╰つ 2024-10-15 16:57:51

这是您正在寻找的工具:

如果您没有安装,使用 zef 安装:

zef install p6doc

如果您尚未安装 zef,请从 zef 的 github 存储库

Here is the tool you are looking for:

If you don't have it installed, install it with zef:

zef install p6doc

If you don't have zef installed, install it from zef's github repo.

终弃我 2024-10-15 16:57:51

嗯...这可能不完全是您想要的,但是:

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 运算符元素周期表

Hmm... This may not be exactly what you want, but:

Perl6::Doc - all useful Perl 6 Docs in your command line

This includes p6doc command line utility, which can be used to read Synopses thusly:

p6doc s05    # Browse Synopsis 05

The full list of synopsis is available here: http://perlcabal.org/syn/ ; Perl 6's built-in functions is s29: http://perlcabal.org/syn/S29.html

I never saw an individual per-function documentation like perldoc -f fname, though.


Also, on a related note there's a Periodic Table of Perl 6 operators

梨涡少年 2024-10-15 16:57:51

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

The perl --doc is actually a red herring.

The command is "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
风铃鹿 2024-10-15 16:57:51

不幸的是,Perl6 没有附带 perldoc 命令。 (事实上​​,就像 Perl 5 一样,尽管大多数 Linux 发行版(除了 Debian)都附带了实用的 perldoc)。

所以你必须安装它。

按照 Perl6 文档 (https://docs.perl6.org/programs/02-reading-docs),您必须执行它。

zef install p6doc

...在我的 Centos 上,它不起作用,因为 p6doc 安装在 rakudo 文件夹中,而不是安装在 bin 目录 groumpf 中。

所以我也喜欢 :)

ln -s /opt/rakudo-pkg/share/perl6/site/bin/p6doc /usr/bin

享受现在吧,有了 perldoc,Perl 世界的生活总是会更好。

Unfortunately, Perl6 doesn't come with a perldoc command. (Like Perl 5 in fact, even though most of Linux distributions, except Debian, come with a functional perldoc).

So you have to install it.

Following Perl6 documentation (https://docs.perl6.org/programs/02-reading-docs), you have to zef it.

zef install p6doc

... and on my Centos, it didn't work, because p6doc is installed in rakudo folder, not in a bin directory, 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文