line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
12
|
|
|
12
|
|
6831
|
use strict; |
|
12
|
|
|
|
|
31
|
|
|
12
|
|
|
|
|
358
|
|
2
|
12
|
|
|
12
|
|
65
|
use warnings; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
492
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package App::Cmd::Command::version 0.335; |
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
71
|
use App::Cmd::Command; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
426
|
|
7
|
12
|
|
|
12
|
|
2288
|
BEGIN { our @ISA = 'App::Cmd::Command'; } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: display an app's version |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod This command will display the program name, its base class |
14
|
|
|
|
|
|
|
#pod with version number, and the full program name. |
15
|
|
|
|
|
|
|
#pod |
16
|
|
|
|
|
|
|
#pod =cut |
17
|
|
|
|
|
|
|
|
18
|
32
|
|
|
32
|
1
|
118
|
sub command_names { qw/version --version/ } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub version_for_display { |
21
|
1
|
|
|
1
|
0
|
4
|
$_[0]->version_package->VERSION |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub version_package { |
25
|
2
|
|
|
2
|
0
|
5
|
ref($_[0]->app) |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub execute { |
29
|
1
|
|
|
1
|
1
|
3
|
my ($self, $opts, $args) = @_; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
7
|
printf "%s (%s) version %s (%s)\n", |
32
|
|
|
|
|
|
|
$self->app->arg0, $self->version_package, |
33
|
|
|
|
|
|
|
$self->version_for_display, $self->app->full_arg0; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |