File Coverage

blib/lib/Dist/Zilla/Plugin/Meta/Contributors.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 26 28 92.8


line stmt bran cond sub pod time code
1 1     1   1333971 use 5.008001;
  1         2  
  1         29  
2 1     1   3 use strict;
  1         2  
  1         28  
3 1     1   3 use warnings;
  1         1  
  1         52  
4              
5             package Dist::Zilla::Plugin::Meta::Contributors;
6             # ABSTRACT: Generate an x_contributors section in distribution metadata
7              
8             our $VERSION = '0.002';
9              
10 1     1   3 use Moose;
  1         1  
  1         7  
11              
12             has contributor => (
13             is => 'ro',
14             isa => 'ArrayRef[Str]',
15             default => sub { [] },
16             );
17              
18 2     2 0 90822 sub mvp_multivalue_args { qw/contributor/ }
19              
20             sub metadata {
21 2     2 0 220624 my $self = shift;
22 2 100       3 if ( @{ $self->contributor } ) {
  2         63  
23 1         28 return { x_contributors => $self->contributor };
24             }
25             else {
26 1         5 return {};
27             }
28             }
29              
30             with 'Dist::Zilla::Role::MetaProvider';
31              
32             __PACKAGE__->meta->make_immutable;
33              
34             1;
35              
36              
37             # vim: ts=4 sts=4 sw=4 et:
38              
39             __END__
40              
41             =pod
42              
43             =encoding UTF-8
44              
45             =head1 NAME
46              
47             Dist::Zilla::Plugin::Meta::Contributors - Generate an x_contributors section in distribution metadata
48              
49             =head1 VERSION
50              
51             version 0.002
52              
53             =head1 SYNOPSIS
54              
55             [Meta::Contributors]
56             contributor = Wile E Coyote <coyote@example.com>
57             contributor = Road Runner <fast@example.com>
58              
59             =head1 DESCRIPTION
60              
61             This module adds author names and email addresses to an C<x_contributors> section
62             of distribution metadata.
63              
64             =for Pod::Coverage mvp_multivalue_args metadata
65              
66             =head1 SEE ALSO
67              
68             =over 4
69              
70             =item *
71              
72             L<Dist::Zilla::Plugin::Git::Contributors> - automatic generation from git commit history, with different ordering options; supports MSWin32
73              
74             =item *
75              
76             L<Dist::Zilla::Plugin::ContributorsFromGit> - an older implementation of git generation, with a heavier dependency chain that is sometimes problematic on some architectures
77              
78             =back
79              
80             =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
81              
82             =head1 SUPPORT
83              
84             =head2 Bugs / Feature Requests
85              
86             Please report any bugs or feature requests through the issue tracker
87             at L<https://github.com/dagolden/Dist-Zilla-Plugin-Meta-Contributors/issues>.
88             You will be notified automatically of any progress on your issue.
89              
90             =head2 Source Code
91              
92             This is open source software. The code repository is available for
93             public review and contribution under the terms of the license.
94              
95             L<https://github.com/dagolden/Dist-Zilla-Plugin-Meta-Contributors>
96              
97             git clone https://github.com/dagolden/Dist-Zilla-Plugin-Meta-Contributors.git
98              
99             =head1 AUTHOR
100              
101             David Golden <dagolden@cpan.org>
102              
103             =head1 CONTRIBUTOR
104              
105             =for stopwords Karen Etheridge
106              
107             Karen Etheridge <ether@cpan.org>
108              
109             =head1 COPYRIGHT AND LICENSE
110              
111             This software is Copyright (c) 2013 by David Golden.
112              
113             This is free software, licensed under:
114              
115             The Apache License, Version 2.0, January 2004
116              
117             =cut