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.018
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 has the same support period as perl itself: it supports
28 the two most recent versions of perl. (That is, if the most recently
29 released version is v5.40, then this module should work on both v5.40
30 and v5.38.)
31
32 Although it may work on older versions of perl, no guarantee is made
33 that the minimum required version will not be increased. The version
34 may be increased for any reason, and there is no promise that patches
35 will be accepted to lower the minimum required perl.
36
38 This role supplies only methods meant to be used internally by its
39 consumer.
40
41 _extract_comment_content($ppi_doc, $key)
42 Given a key, try to find a comment matching "# $key:" in the
43 $ppi_document and return everything but the prefix.
44
45 e.g., given a document with a comment in it of the form:
46
47 # ABSTRACT: Yada yada...
48
49 ...and this is called...
50
51 $self->_extract_comment_content($ppi, 'ABSTRACT')
52
53 ...it returns to us:
54
55 Yada yada...
56
58 Ricardo SIGNES <rjbs@semiotic.systems>
59
61 This software is copyright (c) 2021 by Ricardo SIGNES.
62
63 This is free software; you can redistribute it and/or modify it under
64 the same terms as the Perl 5 programming language system itself.
65
66
67
68perl v5.34.0 2022-0P1o-d2:1:Weaver::Role::StringFromComment(3)