File Coverage

blib/lib/Dist/Zilla/Role/ArchiveBuilder.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Dist::Zilla::Role::ArchiveBuilder 6.037;
2             # ABSTRACT: something that builds archives
3              
4 2     2   12632 use Moose::Role;
  2         5  
  2         23  
5             with 'Dist::Zilla::Role::Plugin';
6              
7 2     2   11801 use Dist::Zilla::Pragmas;
  2         5  
  2         21  
8              
9             requires 'build_archive';
10              
11             #pod =head1 DESCRIPTION
12             #pod
13             #pod Plugins implementing this role have their C<build_archive> method called
14             #pod when it is time to build the archive.
15             #pod
16             #pod =method build_archive
17             #pod
18             #pod This method takes three arguments, and returns a L<Path::Tiny> instance
19             #pod containing the path to the archive.
20             #pod
21             #pod =over 4
22             #pod
23             #pod =item archive_basename
24             #pod
25             #pod This is the name of the archive (including C<-TRIAL> if appropriate) without
26             #pod the format extension (that is the C<.tar.gz> part). The plugin implementing
27             #pod this role should add the appropriate full path including extension as the
28             #pod returned L<Path::Tiny> instance. Not including the extension allows the
29             #pod plugin to choose its own format.
30             #pod
31             #pod =item built_in
32             #pod
33             #pod This is a L<Path::Tiny> where the distribution has been built.
34             #pod
35             #pod =item dist_basename
36             #pod
37             #pod This method will return the dist's basename (e.g. C<Dist-Name-1.01> as a
38             #pod L<Path::Tiny>. The basename is used as the top-level directory in the
39             #pod tarball. It does not include C<-TRIAL>, even if building a trial dist.
40             #pod
41             #pod =back
42             #pod
43             #pod =cut
44              
45 2     2   15 no Moose::Role;
  2         3  
  2         13  
46             1;
47              
48             __END__
49              
50             =pod
51              
52             =encoding UTF-8
53              
54             =head1 NAME
55              
56             Dist::Zilla::Role::ArchiveBuilder - something that builds archives
57              
58             =head1 VERSION
59              
60             version 6.037
61              
62             =head1 DESCRIPTION
63              
64             Plugins implementing this role have their C<build_archive> method called
65             when it is time to build the archive.
66              
67             =head1 PERL VERSION
68              
69             This module should work on any version of perl still receiving updates from
70             the Perl 5 Porters. This means it should work on any version of perl
71             released in the last two to three years. (That is, if the most recently
72             released version is v5.40, then this module should work on both v5.40 and
73             v5.38.)
74              
75             Although it may work on older versions of perl, no guarantee is made that the
76             minimum required version will not be increased. The version may be increased
77             for any reason, and there is no promise that patches will be accepted to
78             lower the minimum required perl.
79              
80             =head1 METHODS
81              
82             =head2 build_archive
83              
84             This method takes three arguments, and returns a L<Path::Tiny> instance
85             containing the path to the archive.
86              
87             =over 4
88              
89             =item archive_basename
90              
91             This is the name of the archive (including C<-TRIAL> if appropriate) without
92             the format extension (that is the C<.tar.gz> part). The plugin implementing
93             this role should add the appropriate full path including extension as the
94             returned L<Path::Tiny> instance. Not including the extension allows the
95             plugin to choose its own format.
96              
97             =item built_in
98              
99             This is a L<Path::Tiny> where the distribution has been built.
100              
101             =item dist_basename
102              
103             This method will return the dist's basename (e.g. C<Dist-Name-1.01> as a
104             L<Path::Tiny>. The basename is used as the top-level directory in the
105             tarball. It does not include C<-TRIAL>, even if building a trial dist.
106              
107             =back
108              
109             =head1 AUTHOR
110              
111             Ricardo SIGNES 😏 <cpan@semiotic.systems>
112              
113             =head1 COPYRIGHT AND LICENSE
114              
115             This software is copyright (c) 2026 by Ricardo SIGNES.
116              
117             This is free software; you can redistribute it and/or modify it under
118             the same terms as the Perl 5 programming language system itself.
119              
120             =cut