1App::PodLinkCheck::ParsUesSeerctCioonntsr(i3b)uted PerlADpopc:u:mPeondtLaitnikoCnheck::ParseSections(3)
2
3
4
6 App::PodLinkCheck::ParseSections -- parse out section names from POD
7
9 use App::PodLinkCheck::ParseSections;
10
12 Pod::Simple
13 App::PodLinkCheck::ParseSections
14
16 This is a POD parser used by "App::PodLinkCheck" to find section names
17 in a document. Its behaviour is specific to PodLinkCheck but might
18 have other use.
19
21 "$parser = App::PodLinkCheck::ParseSections->new($options_hashref)"
22 Create and return a new parser object.
23
24 The default is to disable "Pod::Simple" whining about dubious pod,
25 because "App::PodLinkCheck" is just meant to check links.
26 $options_hashref can have "verbose" to give full messages from
27 "Pod::Simple".
28
29 $parser = App::PodLinkCheck::ParseSections->new({ verbose => 1 });
30
31 It also works to set "$parser->no_whining()" as desired at any
32 time.
33
34 "$parser->parse_file($filename)"
35 Parse the pod from $filename. All the various "Pod::Simple" parse
36 input styles can be used too.
37
38 "$hashref = $parser->sections_hashref()"
39 Return a hashref of the names of POD sections seen by $parser. The
40 keys are the section names. The values are true (presently just
41 1).
42
43 Sections names are mildly normalized by collapsing whitespace to a
44 single space each and removing leading and trailing whitespace.
45 Believe that's mostly how the pod formatters end up treating
46 section names for linking purposes. (That sort of treatment being
47 the intention here.)
48
49 The first word (of non-whitespace) of a section name is added as a
50 hash entry too. This is in the style of "Pod::Checker" and is how
51 the formatters help links to function names in for example
52 perlfunc.
53
54 The section names accumulate everything seen by $parser. No
55 attention is paid to any "Document" start etc. Usually a new
56 "App::PodLinkCheck::ParseSections" is used for each file (unless
57 some union of section names is in fact wanted).
58
60 App::PodLinkCheck, App::PodLinkCheck::ParseLinks
61
63 http://user42.tuxfamily.org/podlinkcheck/index.html
64
66 Copyright 2010, 2011, 2012, 2013, 2016 Kevin Ryde
67
68 PodLinkCheck is free software; you can redistribute it and/or modify it
69 under the terms of the GNU General Public License as published by the
70 Free Software Foundation; either version 3, or (at your option) any
71 later version.
72
73 PodLinkCheck is distributed in the hope that it will be useful, but
74 WITHOUT ANY WARRANTY; without even the implied warranty of
75 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
76 General Public License for more details.
77
78 You should have received a copy of the GNU General Public License along
79 with PodLinkCheck. If not, see <http://www.gnu.org/licenses/>.
80
81
82
83perl v5.36.0 2023-01-20App::PodLinkCheck::ParseSections(3)