Pod::Weaver::Role::StringFromComment - Extract a string from a specially formatted comment
version 4.014
This role assists Pod::Weaver sections by allowing them to pull strings from the source comments formatted like:
# KEYNAME: Some string...
This is probably the most familiar to people using lines like the following to allow the Name section to determine a module's abstract:
# ABSTRACT: Provides the HypnoToad with mind-control powers
It will extract these strings by inspecting the ppi_document which must be given.
ppi_document
This role supplies only methods meant to be used internally by its consumer.
Given a key, try to find a comment matching # $key: in the $ppi_document and return everything but the prefix.
# $key:
$ppi_document
e.g., given a document with a comment in it of the form:
# ABSTRACT: Yada yada...
...and this is called...
$self->_extract_comment_content($ppi, 'ABSTRACT')
...it returns to us:
Yada yada...
Ricardo SIGNES <rjbs@cpan.org>
This software is copyright (c) 2016 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Pod::Weaver, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Weaver
CPAN shell
perl -MCPAN -e shell install Pod::Weaver
For more information on module installation, please visit the detailed CPAN module installation guide.