Catmandu/Cmd/touch.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catmandu/Bag/IdGenerator/UUID.pm ↑ Summary Catmandu/Droppable.pm »
1 package Catmandu::Cmd::touch;
2  
3 14 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 14 our $VERSION = '1.2025';
6  
7 14 ▶use parent 'Catmandu::Cmd';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 14 ▶use Catmandu;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 14 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶sub command_opt_spec {
Subroutine command_opt_spec: called CC=1 SCAR=0.0
Pod documented
12 1 (["key|field=s", "", {required => 1}], ["format=s", ""],);
13 }
14  
15 1 ▶sub command {
Subroutine command: called CC=1 SCAR=0.0
Pod documented
16 1 my ($self, $opts, $args) = @_;
17  
18 1 my ($from_args, $from_opts) = $self->_parse_options($args);
19  
20 1 my $from_bag = delete $from_opts->{bag};
21 1 my $from = Catmandu->store($from_args->[0], $from_opts)->bag($from_bag);
22  
23 1 $from->touch($opts->key, $opts->format);
24 }
25  
26 14 1;
27  
28 __END__
« Catmandu/Bag/IdGenerator/UUID.pm ↑ Summary Catmandu/Droppable.pm »