Dist::Zilla::Plugin::PodnameFromClassname - Insert PODNAME for Moops classes.
Version 0.1100, released 2016-04-02.
In dist.ini:
[PodnameFromClassname]
In a Moops class:
# PODCLASSNAME class My::Class { ... }
Results in:
# PODNAME: My::Class class My::Class { ... }
Dist::Zilla::Plugin::PodnameFromClassname is useful together with Moops and Pod::Weaver. Since Moops classes generally don't also have a package statement Pod::Weaver can't pick up the module name.
package
Pod::Weaver
Using this plugin and adding a # PODCLASSNAME line fixes that (by replacing such a line with the standard # PODNAME: $classname comment). There should be only one # PODCLASSNAME comment per file.
# PODCLASSNAME
# PODNAME: $classname
The plugin picks the first line that starts with class, role, namespace or library and uses the package name given on that line.
class
role
namespace
library
The comment line should match this regular expression:
qr/^[\t ]*# PODCLASSNAME:?$/ms
Note: While this plugin was developed with Moops in mind, it should work with any module that introduces any of those keywords.
Dist::Zilla::Plugin::PodnameFromFilename
Dist::Zilla
https://github.com/Csson/p5-Dist-Zilla-Plugin-PodnameFromClassname
https://metacpan.org/release/Dist-Zilla-Plugin-PodnameFromClassname
Erik Carlsson <info@code301.com>
This software is copyright (c) 2016 by Erik Carlsson.
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 Dist::Zilla::Plugin::PodnameFromClassname, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::PodnameFromClassname
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::PodnameFromClassname
For more information on module installation, please visit the detailed CPAN module installation guide.