NAME
Perl::Critic::Policy::Modules::RequirePerlVersion - Expect a use 5.6.0;
or similar
AFFILIATION
This policy is part of Perl::Critic::More, a bleading edge supplement to Perl::Critic.
DESCRIPTION
As Perl evolves, new desirable features get added. The best ones seem to break backward compatibility, unfortunately. As a favor to downstream developers, it's good to state explicitly which Perl version will not be able to parse your code.
For example, the our
keyword was first appeared in a stable Perl in version 5.6.0. Therefore, if your code employs our
, then you should have a line like this near the very top of your file:
use 5.006;
or
use v5.6.0;
Additionally, it's good form to start that minimum version in your Makefile.PL or Build.PL file.
AUTHOR
Chris Dolan <cdolan@cpan.org>
COPYRIGHT
Copyright (c) 2006 Chris Dolan
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.