1Pod::Weaver::Role::StriUnsgeFrroCmoCnotmrmiebnutt(e3d)PPeordl::DWoecauvmeern:t:aRtoiloen::StringFromComment(3)
2
3
4
6 Pod::Weaver::Role::StringFromComment - Extract a string from a
7 specially formatted comment
8
10 version 4.019
11
13 This role assists Pod::Weaver sections by allowing them to pull strings
14 from the source comments formatted like:
15
16 # KEYNAME: Some string...
17
18 This is probably the most familiar to people using lines like the
19 following to allow the Name section to determine a module's abstract:
20
21 # ABSTRACT: Provides the HypnoToad with mind-control powers
22
23 It will extract these strings by inspecting the "ppi_document" which
24 must be given.
25
27 This module should work on any version of perl still receiving updates
28 from the Perl 5 Porters. This means it should work on any version of
29 perl released in the last two to three years. (That is, if the most
30 recently released version is v5.40, then this module should work on
31 both v5.40 and v5.38.)
32
33 Although it may work on older versions of perl, no guarantee is made
34 that the minimum required version will not be increased. The version
35 may be increased for any reason, and there is no promise that patches
36 will be accepted to lower the minimum required perl.
37
39 This role supplies only methods meant to be used internally by its
40 consumer.
41
42 _extract_comment_content($ppi_doc, $key)
43 Given a key, try to find a comment matching "# $key:" in the
44 $ppi_document and return everything but the prefix.
45
46 e.g., given a document with a comment in it of the form:
47
48 # ABSTRACT: Yada yada...
49
50 ...and this is called...
51
52 $self->_extract_comment_content($ppi, 'ABSTRACT')
53
54 ...it returns to us:
55
56 Yada yada...
57
59 Ricardo SIGNES <cpan@semiotic.systems>
60
62 This software is copyright (c) 2023 by Ricardo SIGNES.
63
64 This is free software; you can redistribute it and/or modify it under
65 the same terms as the Perl 5 programming language system itself.
66
67
68
69perl v5.38.0 2023-0P7o-d2:1:Weaver::Role::StringFromComment(3)