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 b开发者_Go百科lah
-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
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.
精彩评论