Filename | /usr/local/share/perl/5.18.2/App/Cmd/Command/version.pm |
Statements | Executed 10 statements in 196µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 10µs | 22µs | BEGIN@1.14 | Module::Runtime::
1 | 1 | 1 | 7µs | 7µs | BEGIN@7 | App::Cmd::Command::version::
1 | 1 | 1 | 6µs | 10µs | BEGIN@2.15 | Module::Runtime::
1 | 1 | 1 | 4µs | 4µs | BEGIN@6 | App::Cmd::Command::version::
1 | 1 | 1 | 2µs | 2µs | command_names | App::Cmd::Command::version::
0 | 0 | 0 | 0s | 0s | execute | App::Cmd::Command::version::
0 | 0 | 0 | 0s | 0s | version_for_display | App::Cmd::Command::version::
0 | 0 | 0 | 0s | 0s | version_package | App::Cmd::Command::version::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 20µs | 2 | 33µs | # spent 22µs (10+11) within Module::Runtime::BEGIN@1.14 which was called:
# once (10µs+11µs) by Module::Runtime::require_module at line 1 # spent 22µs making 1 call to Module::Runtime::BEGIN@1.14
# spent 11µs making 1 call to strict::import |
2 | 2 | 34µs | 2 | 14µs | # spent 10µs (6+4) within Module::Runtime::BEGIN@2.15 which was called:
# once (6µs+4µs) by Module::Runtime::require_module at line 2 # spent 10µs making 1 call to Module::Runtime::BEGIN@2.15
# spent 4µs making 1 call to warnings::import |
3 | |||||
4 | package App::Cmd::Command::version; | ||||
5 | 1 | 600ns | $App::Cmd::Command::version::VERSION = '0.330'; | ||
6 | 2 | 25µs | 1 | 4µs | # spent 4µs within App::Cmd::Command::version::BEGIN@6 which was called:
# once (4µs+0s) by Module::Runtime::require_module at line 6 # spent 4µs making 1 call to App::Cmd::Command::version::BEGIN@6 |
7 | 1 | 110µs | 1 | 7µs | # spent 7µs within App::Cmd::Command::version::BEGIN@7 which was called:
# once (7µs+0s) by Module::Runtime::require_module at line 7 # spent 7µs making 1 call to App::Cmd::Command::version::BEGIN@7 |
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 | 1 | 4µs | # spent 2µs within App::Cmd::Command::version::command_names which was called:
# once (2µs+0s) by App::Cmd::_load_default_plugin at line 288 of App/Cmd.pm | ||
19 | |||||
20 | sub version_for_display { | ||||
21 | $_[0]->version_package->VERSION | ||||
22 | } | ||||
23 | |||||
24 | sub version_package { | ||||
25 | ref($_[0]->app) | ||||
26 | } | ||||
27 | |||||
28 | sub execute { | ||||
29 | my ($self, $opts, $args) = @_; | ||||
30 | |||||
31 | 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 | 2µs | 1; | ||
37 | |||||
38 | __END__ |