是否有 Perl 模块可以将一个主 Pod 文件拆分为多个视图?
我想为 perlop
和 perlopref
编写一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不这么认为,但我确实对您可以从几个地方开始提出建议。第一个是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.