1Pod::MinimumVersion(3)User Contributed Perl DocumentationPod::MinimumVersion(3)
2
3
4

NAME

6       Pod::MinimumVersion - Perl version for POD directives used
7

SYNOPSIS

9        use Pod::MinimumVersion;
10        my $pmv = Pod::MinimumVersion->new (filename => '/some/foo.pl');
11        print $pmv->minimum_version,"\n";
12        print $pmv->reports;
13

DESCRIPTION

15       "Pod::MinimumVersion" parses the POD in a Perl script, module, or
16       document, and reports what version of Perl is required to process the
17       directives in it with "pod2man" etc.
18

CHECKS

20       The following POD features are identified.
21
22       •   5.004: new "=for", "=begin" and "=end"
23
24       •   5.005: new L<display text|target> style display part
25
26       •   5.6.0: new C<< foo >> etc double-angles
27
28       •   5.8.0: new "=head3" and "=head4"
29
30       •   5.8.0: new L<http://some.where.com> URLs.  (Before 5.8 the "/" is a
31           "section" separator, giving very poor output.)
32
33       •   5.8.0: new E<apos>, E<sol>, E<verbar> chars.  (Documented in 5.6.0,
34           but pod2man doesn't recognise them until 5.8.)
35
36       •   5.10.0: new "=encoding" command.  (Documented in 5.8.0, but
37           "pod2man" doesn't recognise it until 5.10.)
38
39       •   5.12.0: new L<display text|http://some.where.com> URL with text.
40           (Before 5.12 the combination of display part and URL was explicitly
41           disallowed by perlpodspec.)
42
43       POD syntax errors are quietly ignored currently.  The intention is only
44       to check what "pod2man" would act on but it's probably a good idea to
45       use "Pod::Checker" first.
46
47       "J<< >>" for "Pod::MultiLang" is recognised and is allowed for any
48       Perl, including with double-angles.  The assumption is that if you're
49       writing that then you'll first crunch with the "Pod::MultiLang" tools,
50       so it's not important what "pod2man" thinks of it.
51

FUNCTIONS

53       "$pmv = Pod::MinimumVersion->new (key => value, ...)"
54           Create and return a new "Pod::MinimumVersion" object which will
55           analyze a document.  The document is supplied as one of
56
57               filehandle => $fh,
58               string     => 'something',
59               filename   => '/my/dir/foo.pod',
60
61           For "filehandle" and "string", a "filename" can be supplied too to
62           give a name in the reports.  The handle or string is what's
63           actually read.
64
65           The "above_version" option lets you set a Perl version of you have
66           or are targeting, so reports are only about features above that
67           level.
68
69               above_version => '5.006',
70
71       "$version = $pmv->minimum_version ()"
72       "$report = $pmv->minimum_report ()"
73           Return the minimum Perl required for the document in $pmv.
74
75           "minimum_version" returns a "version" number object (see version).
76           "minimum_report" returns a "Pod::MinimumVersion::Report" object
77           (see "REPORT OBJECTS" below).
78
79       "@reports = $pmv->reports ()"
80           Return a list of "Pod::MinimumVersion::Report" objects concerning
81           the document in $pmv.
82
83           These multiple reports let you identify multiple places that a
84           particular Perl is required.  With the "above_version" option the
85           reports are only about things higher than that.
86
87           "minimum_version" and "minimum_report" are simply the highest Perl
88           among these multiple reports.
89

REPORT OBJECTS

91       A "Pod::MinimumVersion::Report" object holds a location within a
92       document and a reason that a particular Perl is needed at that point.
93       The hash fields are
94
95           filename   string
96           linenum    integer, with 1 for the first line
97           version    version.pm object
98           why        string
99
100       "$str = $report->as_string"
101           Return a formatted string for the report.  Currently this is in GNU
102           file:line style, simply
103
104               <filename>:<linenum>: <version> due to <why>
105

SEE ALSO

107       version, Pod::MultiLang,
108       Perl::Critic::Policy::Compatibility::PodMinimumVersion
109
110       Perl::MinimumVersion,
111       Perl::Critic::Policy::Modules::PerlMinimumVersion,
112       Perl::Critic::Policy::Compatibility::PerlMinimumVersionAndWhy
113

HOME PAGE

115       http://user42.tuxfamily.org/pod-minimumversion/index.html
116
118       Copyright 2009, 2010, 2011 Kevin Ryde
119
120       Pod-MinimumVersion is free software; you can redistribute it and/or
121       modify it under the terms of the GNU General Public License as
122       published by the Free Software Foundation; either version 3, or (at
123       your option) any later version.
124
125       Pod-MinimumVersion is distributed in the hope that it will be useful,
126       but WITHOUT ANY WARRANTY; without even the implied warranty of
127       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
128       General Public License for more details.
129
130       You should have received a copy of the GNU General Public License along
131       with Pod-MinimumVersion.  If not, see <http://www.gnu.org/licenses/>.
132
133
134
135perl v5.36.0                      2023-01-20            Pod::MinimumVersion(3)
Impressum