Catmandu/Cmd/drop.pm

filter: Statementstmt 70.8% 17 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 68.5% 24 / 35 CC 2 SCAR 8.6
CC
2
Cov
65%
command
6.0
command_opt_spec
2.0
BEGIN
1.0
CRAP 2.4
« Catmandu/Fix/paste.pm ↑ Summary Catmandu/Plugin/Readonly.pm »
1 package Catmandu::Cmd::drop;
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 Catmandu::Util qw(check_able);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 14 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub command_opt_spec {
Subroutine command_opt_spec: not called CC=1 SCAR=6.9
Pod documented
13 0 (["bag=s", "drop a bag"],);
14 }
15  
16 0 ▶sub command {
Subroutine command: not called CC=2 SCAR=17.9
Pod documented
17 0 my ($self, $opts, $args) = @_;
18  
19 0 my ($from_args, $from_opts) = $self->_parse_options($args);
20  
21 0 my $from = Catmandu->store($from_args->[0], $from_opts);
22 0 ▶ if ($opts->bag) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opts->bag) { } 0 0 0
23 0 check_able($from->bag($opts->bag), 'drop')->drop;
24 }
25 else {
26 0 check_able($from, 'drop')->drop;
27 }
28 }
29  
30 14 1;
31  
32 __END__
« Catmandu/Fix/paste.pm ↑ Summary Catmandu/Plugin/Readonly.pm »