1Dist::Zilla::Role::ModuUlseeMretCaodnattrai(b3u)ted PerlDiDsotc:u:mZeinltlaat:i:oRnole::ModuleMetadata(3)
2
3
4

NAME

6       Dist::Zilla::Role::ModuleMetadata - A role for plugins that use
7       Module::Metadata
8

VERSION

10       version 0.006
11

SYNOPSIS

13           package Dist::Zilla::Plugin::YourNewPlugin;
14           use Moose;
15           with
16               'Dist::Zilla::Role::...',
17               'Dist::Zilla::Role::ModuleMetadata';
18           use namespace::autoclean;
19
20           sub your_method {
21               my $self = shift;
22
23               my $file = ...; # perhaps via the :InstallModules filefinder?
24               my $version = $self->module_metadata_for_file->($file, collect_pod => 1)->version;
25               ...
26           }
27

DESCRIPTION

29       This role provides some common utilities for Dist::Zilla plugins which
30       use Module::Metadata and the information that it provides.
31

METHODS PROVIDED

33   "module_metadata_for_file"
34           my $mmd = $self->module_metadata_for_file($file, @options);
35
36       Given a dzil file object (anything that does Dist::Zilla::Role::File),
37       this method returns a Module::Metadata object for that file's content.
38       Any extra arguments are passed along to "new_from_handle" in
39       Module::Metadata.
40
41       Internally, this method caches these objects. If multiple plugins want
42       an object for the same file, this avoids reparsing it.
43

SEE ALSO

45       •   Module::Metadata
46

SUPPORT

48       Bugs may be submitted through the RT bug tracker
49       <https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Role-
50       ModuleMetadata> (or bug-Dist-Zilla-Role-ModuleMetadata@rt.cpan.org
51       <mailto:bug-Dist-Zilla-Role-ModuleMetadata@rt.cpan.org>).
52
53       There is also a mailing list available for users of this distribution,
54       at <http://dzil.org/#mailing-list>.
55
56       There is also an irc channel available for users of this distribution,
57       at "#distzilla" on "irc.perl.org" <irc://irc.perl.org/#distzilla>.
58
59       I am also usually active on irc, as 'ether' at "irc.perl.org".
60

AUTHOR

62       Karen Etheridge <ether@cpan.org>
63
65       This software is copyright (c) 2015 by Karen Etheridge.
66
67       This is free software; you can redistribute it and/or modify it under
68       the same terms as the Perl 5 programming language system itself.
69
70
71
72perl v5.36.0                      2022-07-2D2ist::Zilla::Role::ModuleMetadata(3)
Impressum