File Coverage

blib/lib/Dist/Zilla/App/Command.pm
Criterion Covered Total %
statement 7 8 87.5
branch n/a
condition n/a
subroutine 3 4 75.0
pod 2 2 100.0
total 12 14 85.7


line stmt bran cond sub pod time code
1             package Dist::Zilla::App::Command 6.037;
2             # ABSTRACT: base class for dzil commands
3              
4 4     4   2863 use Dist::Zilla::Pragmas;
  4         16  
  4         38  
5              
6 4     4   23 use App::Cmd::Setup -command;
  4         7  
  4         23  
7              
8             #pod =method zilla
9             #pod
10             #pod This returns the Dist::Zilla object in use by the command. If none has yet
11             #pod been constructed, one will be by calling C<< Dist::Zilla->from_config >>.
12             #pod
13             #pod (This method just delegates to the Dist::Zilla::App object!)
14             #pod
15             #pod =cut
16              
17             sub zilla {
18 22     22 1 124 return $_[0]->app->zilla;
19             }
20              
21             #pod =method log
22             #pod
23             #pod This method calls the C<log> method of the application's chrome.
24             #pod
25             #pod =cut
26              
27             sub log {
28 0     0 1   $_[0]->app->chrome->logger->log($_[1]);
29             }
30              
31             1;
32              
33             __END__
34              
35             =pod
36              
37             =encoding UTF-8
38              
39             =head1 NAME
40              
41             Dist::Zilla::App::Command - base class for dzil commands
42              
43             =head1 VERSION
44              
45             version 6.037
46              
47             =head1 PERL VERSION
48              
49             This module should work on any version of perl still receiving updates from
50             the Perl 5 Porters. This means it should work on any version of perl
51             released in the last two to three years. (That is, if the most recently
52             released version is v5.40, then this module should work on both v5.40 and
53             v5.38.)
54              
55             Although it may work on older versions of perl, no guarantee is made that the
56             minimum required version will not be increased. The version may be increased
57             for any reason, and there is no promise that patches will be accepted to
58             lower the minimum required perl.
59              
60             =head1 METHODS
61              
62             =head2 zilla
63              
64             This returns the Dist::Zilla object in use by the command. If none has yet
65             been constructed, one will be by calling C<< Dist::Zilla->from_config >>.
66              
67             (This method just delegates to the Dist::Zilla::App object!)
68              
69             =head2 log
70              
71             This method calls the C<log> method of the application's chrome.
72              
73             =head1 AUTHOR
74              
75             Ricardo SIGNES 😏 <cpan@semiotic.systems>
76              
77             =head1 COPYRIGHT AND LICENSE
78              
79             This software is copyright (c) 2026 by Ricardo SIGNES.
80              
81             This is free software; you can redistribute it and/or modify it under
82             the same terms as the Perl 5 programming language system itself.
83              
84             =cut