| 1 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Footprintless::App::Command::log::tail; | ||||||||||
| 5 | 5 | $Footprintless::App::Command::log::tail::VERSION = '1.29'; | |||||||||
| 6 | # ABSTRACT: output the last part of a file | ||||||||||
| 7 | # PODNAME: Footprintless::App::Command::log::tail | ||||||||||
| 8 | |||||||||||
| 9 | 5 | ▶ | use parent qw(Footprintless::App::Action); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 5 | ▶ | use Footprintless::App -ignore; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 5 | ▶ | use Log::Any; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 5 | my $logger = Log::Any->get_logger(); | |||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub execute { | ||||||||
|
Subroutine
execute: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 17 | 0 | my ( $self, $opts, $args ) = @_; | |||||||||
| 18 | |||||||||||
| 19 | $self->{log}->tail( | ||||||||||
| 20 | runner_options => { out_handle => \*STDOUT }, | ||||||||||
| 21 | 0 | ▶ | ( $opts->{arg} ? ( args => $opts->{arg} ) : () ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | ); | ||||||||||
| 23 | |||||||||||
| 24 | 0 | $logger->info('Done...'); | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub opt_spec { | ||||||||
|
Subroutine
opt_spec: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 28 | 0 | return ( [ 'arg=s@', 'an argument passed to the command' ] ); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub usage_desc { | ||||||||
|
Subroutine
usage_desc: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 32 | 0 | return "fpl log LOG_COORD tail %o"; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub validate_args { | ||||||||
|
Subroutine
validate_args: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 36 | 0 | my ( $self, $opts, $args ) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 0 | eval { $self->{log} = $self->{footprintless}->log( $self->{coordinate} ); }; | |||||||||
| 39 | 0 | ▶ | $self->usage_error("invalid coordinate [$self->{coordinate}]: $@") if ($@); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 5 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||