Pod::MinimumVersion(3pm) | User Contributed Perl Documentation | Pod::MinimumVersion(3pm) |
Pod::MinimumVersion - Perl version for POD directives used
use Pod::MinimumVersion; my $pmv = Pod::MinimumVersion->new (filename => '/some/foo.pl'); print $pmv->minimum_version,"\n"; print $pmv->reports;
"Pod::MinimumVersion" parses the POD in a Perl script, module, or document, and reports what version of Perl is required to process the directives in it with "pod2man" etc.
The following POD features are identified.
POD syntax errors are quietly ignored currently. The intention is only to check what "pod2man" would act on but it's probably a good idea to use "Pod::Checker" first.
"J<< >>" for "Pod::MultiLang" is recognised and is allowed for any Perl, including with double-angles. The assumption is that if you're writing that then you'll first crunch with the "Pod::MultiLang" tools, so it's not important what "pod2man" thinks of it.
filehandle => $fh, string => 'something', filename => '/my/dir/foo.pod',
For "filehandle" and "string", a "filename" can be supplied too to give a name in the reports. The handle or string is what's actually read.
The "above_version" option lets you set a Perl version of you have or are targeting, so reports are only about features above that level.
above_version => '5.006',
"minimum_version" returns a "version" number object (see version). "minimum_report" returns a "Pod::MinimumVersion::Report" object (see "REPORT OBJECTS" below).
These multiple reports let you identify multiple places that a particular Perl is required. With the "above_version" option the reports are only about things higher than that.
"minimum_version" and "minimum_report" are simply the highest Perl among these multiple reports.
A "Pod::MinimumVersion::Report" object holds a location within a document and a reason that a particular Perl is needed at that point. The hash fields are
filename string linenum integer, with 1 for the first line version version.pm object why string
<filename>:<linenum>: <version> due to <why>
version, Pod::MultiLang, Perl::Critic::Policy::Compatibility::PodMinimumVersion
Perl::MinimumVersion, Perl::Critic::Policy::Modules::PerlMinimumVersion, Perl::Critic::Policy::Compatibility::PerlMinimumVersionAndWhy
http://user42.tuxfamily.org/pod-minimumversion/index.html
Copyright 2009, 2010, 2011 Kevin Ryde
Pod-MinimumVersion 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.
Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see <http://www.gnu.org/licenses/>.
2022-05-27 | perl v5.34.0 |