perldoc/POD - 不要在段落中添加额外的行

Rus*_*mur 0 documentation perl

我正在尝试编写一些POD文档并使用perldoc来显示它.我的目标是让格式看起来像这样:

REQUIRED ARGUMENTS
    argument1
        Description of the first argument. 

    argmuent2
        Description of the second argument.            
Run Code Online (Sandbox Code Playgroud)

其中"REQUIRED ARGUMENTS"是粗体标题,"argument1"和"argument2"是斜体.

但我无法弄清楚如何获得特定的缩进.

我试过这个:

=head1 REQUIRED ARGUMENTS

I<argument1>
Description of the first argument.

I<argument2>
Description of the second argument.
Run Code Online (Sandbox Code Playgroud)

产生以下内容(正确显示粗体标题和斜体,但不需要运行描述):

REQUIRED ARGUMENTS
    argument1 Description of the first argument.

    argument2 Description of the second argument.
Run Code Online (Sandbox Code Playgroud)

我试过了:

=head1 REQUIRED ARGUMENTS

I<argument1>

Description of the first argument.

I<argument2>

Description of the second argument.
Run Code Online (Sandbox Code Playgroud)

产生以下内容(粗体和斜体也很好,但现在参数和描述之间有一条额外的线):

REQUIRED ARGUMENTS
    argument1

    Description of the first argument.

    argument2

    Description of the second argument.
Run Code Online (Sandbox Code Playgroud)

除了其他一些也没有成功的事情,我试过这个:

=head1 REQUIRED ARGUMENTS

I<argument1>

=over 4

Description of the first argument.

=back
Run Code Online (Sandbox Code Playgroud)

结果如下:

REQUIRED ARGUMENTS
    argument1

        Description of the first argument.
Run Code Online (Sandbox Code Playgroud)

cho*_*oba 5

使用参数的项目:

=head1 REQUIRED ARGUMENTS

=over 4

=item I<argument1>

Description of the first argument.

=item I<argument2>

Description of the second argument.

=back

=cut
Run Code Online (Sandbox Code Playgroud)