Pod::M...Version(3pm)
π Pod::MinimumVersion β NAME energy π
okay bestie, this is Pod::MinimumVersion β it tells you which Perl version you actually need for the POD directives you used. no cap. π
β¨ SYNOPSIS β¨
use Pod::MinimumVersion;
my $pmv = Pod::MinimumVersion->new (filename => '/some/foo.pl');
print $pmv->minimum_version,"\n";
print $pmv->reports;
like, that's it. that's the whole vibe. π¦
πΈ DESCRIPTION πΈ
so Pod::MinimumVersion parses the POD inside a Perl script, module, or document, and then it reports what version of Perl is required to process the directives in it with pod2man etc. she's a detective and she's good at her job π
π CHECKS π
here's every POD feature she sniffs out, bestie:
- 5.004 β the new
=for,=beginand=endβ¨ - 5.005 β the new
L<display text|target>style display part π« - 5.6.0 β the new
C<< foo >>etc double-angles π - 5.8.0 β the new
=head3and=head4π - 5.8.0 β the new
L<http://some.where.com>URLs. (before 5.8 the/is asectionseparator, which gives very poor output π) - 5.8.0 β the new
E<apos>,E<sol>,E<verbar>chars. (they're documented in 5.6.0, butpod2mandoesn't recognise them until 5.8. the disrespect π) - 5.10.0 β the new
=encodingcommand. (documented in 5.8.0, butpod2mandoesn't recognise it until 5.10. again. π€) - 5.12.0 β the new
L<display text|http://some.where.com>URL with text. (before 5.12 the combination of display part and URL was explicitly disallowed by perlpodspec. literally banned. π)
POD syntax errors are quietly ignored currently. the intention is only to check whatpod2manwould act on but it's probably a good idea to usePod::Checkerfirst. π
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. she's chill about it, periodt. π
π«Ά FUNCTIONS π«Ά
$pmv = Pod::MinimumVersion->new (key => value, ...)
Create and return a new Pod::MinimumVersion object which will analyze a document. the document is supplied as one of these:
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, bestie. don't get it twisted. β¨
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. iconic behaviour honestly.
above_version => '5.006',
$version = $pmv->minimum_version ()
$report = $pmv->minimum_report ()
Return the minimum Perl required for the document in $pmv. π
minimum_version returns a version number object (see version). minimum_report returns a Pod::MinimumVersion::Report object (see REPORT OBJECTS below). two icons, two jobs. π
@reports = $pmv->reports ()
Return a list of Pod::MinimumVersion::Report objects concerning the document in $pmv. π
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. she's thorough, she's giving main character energy. π
minimum_version and minimum_report are simply the highest Perl among these multiple reports. the queen of the pile. π
π¦ REPORT OBJECTS π¦
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
$str = $report->as_string
Return a formatted string for the report. currently this is in GNU file:line style, simply:
<filename>:<linenum>: <version> due to <why>
clean. minimal. slay. β¨
π SEE ALSO π
version, Pod::MultiLang, Perl::Critic::Policy::Compatibility::PodMinimumVersion
Perl::MinimumVersion, Perl::Critic::Policy::Modules::PerlMinimumVersion, Perl::Critic::Policy::Compatibility::PerlMinimumVersionAndWhy
π HOME PAGE π
http://user42.tuxfamily.org/pod-minimumversion/index.html
go visit her, she's lovely π
π COPYRIGHT π
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. (read it, bestie, it's important π)
You should have received a copy of the GNU General Public License along with Pod-MinimumVersion. If not, see <http://www.gnu.org/licenses/>.
okay that's the whole page, and the lil sign-off at the bottom says this is from perl v5.34.0, dated 2022-05-27, filed under Pod::M...Version(3pm). love that for her. bye bestie, go check your POD versions π β¨π
π¦ where this page comes from
- debian bookworm: libpod-minimumversion-perl 50-3 Β· GPL-3.0-or-later
- debian trixie: libpod-minimumversion-perl 50-3 Β· GPL-3.0-or-later
- ubuntu noble: libpod-minimumversion-perl 50-3 Β· GPL-3.0-or-later
- ubuntu resolute: libpod-minimumversion-perl 50-3 Β· GPL-3.0-or-later
- ubuntu stonking: libpod-minimumversion-perl 50-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms