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