是否有 Perl 模块可以将一个主 Pod 文件拆分为多个视图?

发布于 2024-09-07 18:05:35 字数 1274 浏览 8 评论 0原文

我想为 perlopperlopref 编写一个 Pod 文件。我的直觉是这样说

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

=for short

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

=for long

-head3 Description

blah blah blah

-head3 Example

blah blah blah

-head3 See Also    

blah blah blah

=head2 qq(X)

=for short

The generalized double quote circumflex operator surrounds an interpolating
string. See L<perlop/qq(X)>

=for long

-head3 Description

blah blah blah

-head3 Example

blah blah blah

-head3 See Also    

blah blah blah

并让它产生 (perlopref)

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

=head2 qq(X)

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

和 (perlop)

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

=head3 Description

blah blah blah

=head3 Example

blah blah blah

=head3 See Also    

blah blah blah

=head2 qq(X)

=head3 Description

blah blah blah

=head3 Example

blah blah blah

=head3 See Also    

blah blah blah

I want to write one Pod file for perlop and perlopref. My gut instinct is to say something like

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

=for short

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

=for long

-head3 Description

blah blah blah

-head3 Example

blah blah blah

-head3 See Also    

blah blah blah

=head2 qq(X)

=for short

The generalized double quote circumflex operator surrounds an interpolating
string. See L<perlop/qq(X)>

=for long

-head3 Description

blah blah blah

-head3 Example

blah blah blah

-head3 See Also    

blah blah blah

And have it produce (perlopref)

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

=head2 qq(X)

The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.

and (perlop)

=head1 PRECEDENCE

blah

=head1 OPERATORS

=head2 "X"

=head3 Description

blah blah blah

=head3 Example

blah blah blah

=head3 See Also    

blah blah blah

=head2 qq(X)

=head3 Description

blah blah blah

=head3 Example

blah blah blah

=head3 See Also    

blah blah blah

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

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

发布评论

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

评论(1

掩饰不了的爱 2024-09-14 18:05:35

我不这么认为,但我确实对您可以从几个地方开始提出建议。第一个是Pod::Inherit,这是DBIx::Class的一个工具用于生成包含从超类继承的方法的文档的 POD。第二个是 Pod::Weaver,它是一个通用的 POD munger,由Dist::Zilla 具有自己的基于规则的配置风格,并且可能不需要大量工作就可以完成您所需要的操作 - 但目前它的文档还很少。

I don't think so, but I do have a suggestion for a couple places you could start. The first is Pod::Inherit, which is a tool that DBIx::Class uses to produce POD that includes the documentation of inherited methods from superclasses. The second is Pod::Weaver which is a general-purpose POD munger used by Dist::Zilla that has its own flavor of rules-based configuration, and could probably do what you need without a lot of work -- but it's a little light on documentation right now.

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