File Coverage

blib/lib/Boxer/CLI/Command/About.pm
Criterion Covered Total %
statement 30 41 73.1
branch 0 4 0.0
condition 0 4 0.0
subroutine 11 13 84.6
pod 3 3 100.0
total 44 65 67.6


line stmt bran cond sub pod time code
1             package Boxer::CLI::Command::About;
2              
3             =encoding UTF-8
4              
5             =cut
6              
7 3     3   13518 use v5.20;
  3         10  
8 3     3   15 use utf8;
  3         4  
  3         17  
9 3     3   86 use Role::Commons -all;
  3         5  
  3         22  
10 3     3   4657 use feature 'signatures';
  3         4  
  3         382  
11 3     3   22 use namespace::autoclean 0.16;
  3         50  
  3         18  
12              
13 3     3   229 use Boxer::CLI -command;
  3         7  
  3         34  
14              
15 3     3   6254 use strictures 2;
  3         21  
  3         108  
16 3     3   567 no warnings "experimental::signatures";
  3         5  
  3         162  
17              
18             =head1 VERSION
19              
20             Version v1.4.2
21              
22             =cut
23              
24             our $VERSION = "v1.4.2";
25              
26             use constant {
27 3         284 abstract => q[list which boxer plugins are installed],
28             usage_desc => q[%c about],
29 3     3   17 };
  3         5  
30              
31 3     3   20 use constant FORMAT_STR => "%-36s%10s %s\n";
  3         5  
  3         853  
32              
33             sub command_names
34             {
35 5     5 1 39317 qw(
36             about
37             credits
38             );
39             }
40              
41             sub opt_spec
42             {
43 0     0 1   return;
44             }
45              
46 0           sub execute ( $self, $opt, $args )
  0            
47 0     0 1   {
  0            
  0            
48 0           my $auth = $self->app->can('AUTHORITY');
49 0 0 0       printf(
50             FORMAT_STR,
51             ref( $self->app ),
52             $self->app->VERSION,
53             $auth ? $self->app->$auth || '???' : '???',
54             );
55              
56 0           foreach my $cmd ( sort $self->app->command_plugins ) {
57 0           my $auth = $cmd->can('AUTHORITY');
58 0 0 0       printf(
59             FORMAT_STR,
60             $cmd,
61             $cmd->VERSION,
62             $auth ? $cmd->$auth || '???' : '???',
63             );
64             }
65             }
66              
67             =head1 AUTHOR
68              
69             Jonas Smedegaard C<< <dr@jones.dk> >>.
70              
71             =cut
72              
73             our $AUTHORITY = 'cpan:JONASS';
74              
75             =head1 COPYRIGHT AND LICENCE
76              
77             Copyright © 2013-2016 Jonas Smedegaard
78              
79             This is free software; you can redistribute it and/or modify it under
80             the same terms as the Perl 5 programming language system itself.
81              
82             =head1 DISCLAIMER OF WARRANTIES
83              
84             THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
85             WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
86             MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
87              
88             =cut
89              
90             1;