line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
2049
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
114
|
|
2
|
5
|
|
|
5
|
|
22
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
225
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Footprintless::App::Command::log::grep; |
5
|
|
|
|
|
|
|
$Footprintless::App::Command::log::grep::VERSION = '1.26'; |
6
|
|
|
|
|
|
|
# ABSTRACT: output lines matching a pattern |
7
|
|
|
|
|
|
|
# PODNAME: Footprintless::App::Command::log::grep |
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
27
|
use parent qw(Footprintless::App::Action); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
21
|
|
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
254
|
use Footprintless::App -ignore; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
26
|
|
12
|
5
|
|
|
5
|
|
805
|
use Log::Any; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
20
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $logger = Log::Any->get_logger(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub execute { |
17
|
1
|
|
|
1
|
1
|
2
|
my ( $self, $opts, $args ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$self->{log}->grep( |
20
|
|
|
|
|
|
|
runner_options => { out_handle => \*STDOUT }, |
21
|
1
|
50
|
|
|
|
9
|
( $opts->{arg} ? ( args => $opts->{arg} ) : () ) |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
5
|
$logger->info('Done...'); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub opt_spec { |
28
|
1
|
|
|
1
|
1
|
6
|
return ( [ 'arg=s@', 'an argument passed to the command' ] ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub usage_desc { |
32
|
1
|
|
|
1
|
1
|
3
|
return "fpl log LOG_COORD grep %o"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub validate_args { |
36
|
1
|
|
|
1
|
1
|
3
|
my ( $self, $opts, $args ) = @_; |
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
1
|
eval { $self->{log} = $self->{footprintless}->log( $self->{coordinate} ); }; |
|
1
|
|
|
|
|
4
|
|
39
|
1
|
50
|
|
|
|
4
|
$self->usage_error("invalid coordinate [$self->{coordinate}]: $@") if ($@); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |