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.030;
2             # ABSTRACT: base class for dzil commands
3              
4 4     4   3436 use Dist::Zilla::Pragmas;
  4         10  
  4         30  
5              
6 4     4   38 use App::Cmd::Setup -command;
  4         9  
  4         34  
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 168 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.030
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 released
51             in the last two to three years. (That is, if the most recently released
52             version is v5.40, then this module should work on both v5.40 and v5.38.)
53              
54             Although it may work on older versions of perl, no guarantee is made that the
55             minimum required version will not be increased. The version may be increased
56             for any reason, and there is no promise that patches will be accepted to lower
57             the minimum required perl.
58              
59             =head1 METHODS
60              
61             =head2 zilla
62              
63             This returns the Dist::Zilla object in use by the command. If none has yet
64             been constructed, one will be by calling C<< Dist::Zilla->from_config >>.
65              
66             (This method just delegates to the Dist::Zilla::App object!)
67              
68             =head2 log
69              
70             This method calls the C<log> method of the application's chrome.
71              
72             =head1 AUTHOR
73              
74             Ricardo SIGNES 😏 <cpan@semiotic.systems>
75              
76             =head1 COPYRIGHT AND LICENSE
77              
78             This software is copyright (c) 2023 by Ricardo SIGNES.
79              
80             This is free software; you can redistribute it and/or modify it under
81             the same terms as the Perl 5 programming language system itself.
82              
83             =cut