NAME
Pod::Coverage::More::Generator - Write the POD of each sub from its blurb and the analysis of its code
VERSION
version 0.002
SYNOPSIS
use Pod::Coverage::More::Generator;
my $generator = Pod::Coverage::More::Generator->new( package => 'Pod::Coverage::More::Generator' );
print $generator->pod;
DESCRIPTION
Writes a POD section for each public sub that has a blurb, as Pod::Coverage::More::Blurb reads it, and no POD of its own or of a parent class. An override of a sub that a parent class has a blurb for gets none either, because the section of the parent documents it. A sub without a blurb gets no section: the blurb is how a sub opts in, as # ABSTRACT: is how a module does.
A section says what the blurb says, and fills in what the code declares where the blurb is silent:
- The arguments are the parameters of the sub, and the keys of a hash of named arguments. A sub whose code shows no parameters, as a stub, takes the arguments of its blurb.
- The type of an argument is the type in its
@param, or else the type that the code declares. - The return value is the
@returns, or else the type that the code declares, or else the types of the values that it returns for certain, as literals andblessinto a class.
The result of an operator and the uses of a variable are only probable, so they are never written. The sections follow the forms that Pod::Coverage::More::Documentation reads, so that Pod::Coverage::More can check them.
METHODS
new(package, file)
A generator for the package package, which must be loaded.
- package - Str - the name of the package
- file - Str - optional: the file to read the blurbs from, by default the file that the package was loaded from
Returns a Pod::Coverage::More::Generator object, the generator.
my $generator = Pod::Coverage::More::Generator->new( package => 'Some::Module', file => 'lib/Some/Module.pm' );
pod
The text of all the sections, one after another.
Returns Str, the POD, or the empty string when no sub gets a section.
my $pod = $generator->pod;
sections
One section per sub that gets one, in the order of the names of the subs: a HASHREF with name, the name of the sub, and pod, the text of its section, which starts with a =head2.
Returns the sections, as a list.
my @sections = $generator->sections;
SEE ALSO
Please see those modules/websites for more information related to this module.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/teodesian/Pod-Coverage-More/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHORS
Current Maintainers:
George S. Baugh <teodesian@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 2014-2026 George S. Baugh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.