GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Perl::Critic::Policy::Documentation::RequireFinalCut(3) User Contributed Perl Documentation Perl::Critic::Policy::Documentation::RequireFinalCut(3)

Perl::Critic::Policy::Documentation::RequireFinalCut - end POD with =cut directive

This policy is part of the "Perl::Critic::Pulp" add-on. It asks you to end POD with a "=cut" directive at the end of a file.

    =head1 DOCO

    Some text.

    =cut             # ok

The idea is to have a definite end indication for human readers. Perl and the POD processors don't require a final "=cut". On that basis this policy is lowest severity and under the "cosmetic" theme (see "POLICY THEMES" in Perl::Critic).

If there's no POD in the file then a "=cut" is not required. Or if the file ends with code rather than POD then a "=cut" after that code is not required.

    =head2 About foo

    =cut

    sub foo {
    }              # ok, file ends with code not POD

If there's POD at end of file but consists only of "=begin/=end" blocks then a "=cut" is not required. It's reckoned the "=end" is enough in this case.

    =begin wikidoc

    Entire document in wiki style.

    =end wikidoc          # ok, =cut not required

If the file ends with a mixture of ordinary POD and "=begin" blocks then a is still required. The special allowance is when only "=begin" blocks, presumably destined for some other markup system.

Generally a "=cut" should have a blank line before it, the same as other POD commands. But Perl execution doesn't enforce that and the same looseness is permitted here,

    =pod

    Blah blah blah
    =cut                  # ok without preceding newline

A check for blanks around POD commands is left to other policies. The "podchecker" program reports this (Pod::Checker).

If you don't care about a final "=cut" you can disable "RequireFinalCut" from your .perlcriticrc in the usual way (see "CONFIGURATION" in Perl::Critic),

    [-Documentation::RequireFinalCut]

Perl::Critic::Pulp, Perl::Critic

Perl::Critic::Policy::Documentation::RequireEndBeforeLastPod, Perl::Critic::Policy::Documentation::RequirePodAtEnd

<http://user42.tuxfamily.org/perl-critic-pulp/index.html>

Copyright 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2021 Kevin Ryde

Perl-Critic-Pulp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Perl-Critic-Pulp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Perl-Critic-Pulp. If not, see <http://www.gnu.org/licenses/>.

2021-02-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.