| 1 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package App::Cmd::Command::version 0.340; | ||
| 5 | |||
| 6 | 13 | ▶ | use App::Cmd::Command; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 13 | ▶ | BEGIN { our @ISA = 'App::Cmd::Command'; } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 36 | ▶ | sub command_names { qw/version --version/ } |
|
Subroutine
command_names: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | |||
| 20 | 2 | ▶ | sub version_for_display { |
|
Subroutine
version_for_display: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 21 | 2 | $_[0]->version_package->VERSION | |
| 22 | } | ||
| 23 | |||
| 24 | 4 | ▶ | sub version_package { |
|
Subroutine
version_package: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | 4 | ref($_[0]->app) | |
| 26 | } | ||
| 27 | |||
| 28 | 2 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
documented
| |||
| 29 | 2 | my ($self, $opts, $args) = @_; | |
| 30 | |||
| 31 | 2 | 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 | 13 | 1; | |
| 37 | |||
| 38 | __END__ | ||