NAME
Dist::Zilla::Plugin::PodnameFromClassname - Insert PODNAME for Moops classes.
VERSION
Version 0.1100, released 2016-04-02.
SYNOPSIS
In dist.ini:
[PodnameFromClassname]
In a Moops class:
# PODCLASSNAME
class My::Class { ... }
Results in:
# PODNAME: My::Class
class My::Class { ... }
DESCRIPTION
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.
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.
The plugin picks the first line that starts with class, role, namespace or library and uses the package name given on that line.
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.
SEE ALSO
SOURCE
https://github.com/Csson/p5-Dist-Zilla-Plugin-PodnameFromClassname
HOMEPAGE
https://metacpan.org/release/Dist-Zilla-Plugin-PodnameFromClassname
AUTHOR
Erik Carlsson <info@code301.com>
COPYRIGHT AND LICENSE
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.