line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
14
|
|
|
14
|
|
110086
|
|
|
14
|
|
|
|
|
32
|
|
|
14
|
|
|
|
|
84
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use parent 'Catmandu::Cmd'; |
7
|
14
|
|
|
14
|
|
84
|
use Catmandu; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
76
|
|
8
|
14
|
|
|
14
|
|
924
|
use namespace::clean; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
101
|
|
9
|
14
|
|
|
14
|
|
2757
|
|
|
14
|
|
|
|
|
31
|
|
|
14
|
|
|
|
|
65
|
|
10
|
|
|
|
|
|
|
(["key|field=s", "", {required => 1}], ["format=s", ""],); |
11
|
|
|
|
|
|
|
} |
12
|
1
|
|
|
1
|
1
|
10
|
|
13
|
|
|
|
|
|
|
my ($self, $opts, $args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my ($from_args, $from_opts) = $self->_parse_options($args); |
16
|
1
|
|
|
1
|
1
|
5
|
|
17
|
|
|
|
|
|
|
my $from_bag = delete $from_opts->{bag}; |
18
|
1
|
|
|
|
|
6
|
my $from = Catmandu->store($from_args->[0], $from_opts)->bag($from_bag); |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
3
|
$from->touch($opts->key, $opts->format); |
21
|
1
|
|
|
|
|
7
|
} |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
15
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=pod |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Catmandu::Cmd::touch - add the current datetime to the items in a bag |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 EXAMPLES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
catmandu touch <STORE> <OPTIONS> |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
catmandu touch MongoDB --index-name shop --bag products --field date_updated |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |