NAME

Perl::Critic::Policy::Documentation::RequirePodSections

DESCRIPTION

This Policy requires your POD to contain certain =head1 sections. If the file doesn't contain any POD at all, then this Policy does not apply. Tools like Module::Starter make it really easy to ensure that every module has the same documentation framework, and they can save you lots of keystrokes.

DEFAULTS

Different POD sections are required, depending on whether the file is a library or program (which is determined by the presence or absence of a perl shebang line).

          Default Required POD Sections

Perl Libraries                     Perl Programs
------------------------------------------------------
NAME                               NAME
VERSION                            VERSION
SYNOPSIS                           USAGE
DESCRIPTION                        DESCRIPTION
SUBROUTINES/METHODS                REQUIRED ARGUMENTS
                                   OPTIONS
DIAGNOSTICS                        DIAGNOSTICS
                                   EXIT STATUS
CONFIGURATION                      CONFIGURATION
DEPENDENCIES                       DEPENDENCIES
INCOMPATIBILITIES                  INCOMPATIBILITIES
BUGS AND LIMITATIONS               BUGS AND LIMITATIONS
AUTHOR                             AUTHOR
LICENSE AND COPYRIGHT              LICENSE AND COPYRIGHT

CONFIGURATION

The sections required for modules and programs can independently customized, by giving values for script_sections and lib_sections of a string of pipe-delimited required POD section names. An example of entries in a .perlcriticrc file:

[Documentation::RequirePodSections]
lib_sections    = NAME | SYNOPSIS | BUGS AND LIMITATIONS | AUTHOR
script_sections = NAME | USAGE | OPTIONS | EXIT STATUS | AUTHOR

LIMITATIONS

Currently, this Policy does not look for the required POD sections below the =head1 level. Also, it does not require the sections to appear in any particular order.

SUBROUTINES

default_script_sections()

Returns a list of the default POD section that are required for Perl scripts. A Perl script is anything that contains a shebang line that looks like /perl/.

default_lib_sections()

Returns a list of the default POD section that are required for Perl libraries and modules.

AUTHOR

Jeffrey Ryan Thalhammer <thaljef@cpan.org>

COPYRIGHT

Copyright (c) 2006 Jeffrey Ryan Thalhammer. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module