Perl::Critic::Policy::Documentation::RequireFinalCut - end POD with =cut directive
This policy is part of the Perl::Critic::Pulp addon. It asks you to end POD with a =cut directive at the end of a file.
Perl::Critic::Pulp
=cut
=head1 DOCO Some text. =cut # ok
The idea is to have a definite end of file indication for human readers. Perl and the POD processors don't require a final =cut. On that basis this policy is lowest priority 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 POD is not at the end of file then another =cut at the end is not required.
=head2 About foo =cut sub foo { # ok, file ends with code not POD }
If POD is at end of file but consists only of =begin/=end blocks then a =cut is not required, it being reckoned the =end is enough in this case.
=begin/=end
=end
=begin wikidoc Entire document in wiki style. =end wikidoc # ok, =cut not required
If you've got a mixture of POD and =begin blocks then a =cut is still required, but not if the only thing is an =begin presumably destined for some other markup system.
=begin
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),
RequireFinalCut
[-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 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/>.
To install Perl::Critic::Pulp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Pulp
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Pulp
For more information on module installation, please visit the detailed CPAN module installation guide.