line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
14
|
|
|
14
|
|
121560
|
|
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
74
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use parent 'Catmandu::Cmd'; |
7
|
14
|
|
|
14
|
|
89
|
use Catmandu; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
67
|
|
8
|
14
|
|
|
14
|
|
900
|
use namespace::clean; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
62
|
|
9
|
14
|
|
|
14
|
|
2583
|
|
|
14
|
|
|
|
|
41
|
|
|
14
|
|
|
|
|
72
|
|
10
|
|
|
|
|
|
|
(["key|field=s", "", {required => 1}], ["format=s", ""],); |
11
|
|
|
|
|
|
|
} |
12
|
1
|
|
|
1
|
1
|
14
|
|
13
|
|
|
|
|
|
|
my ($self, $opts, $args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my ($from_args, $from_opts) = $self->_parse_options($args); |
16
|
1
|
|
|
1
|
1
|
3
|
|
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
|
|
|
|
|
2
|
$from->touch($opts->key, $opts->format); |
21
|
1
|
|
|
|
|
10
|
} |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
17
|
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 |