blib/lib/Kubernetes/REST/CLI/Cmd/Get.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 3 SCAR 20.8
CC
3
Cov
0%
execute
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package Kubernetes::REST::CLI::Cmd::Get;
2 our $VERSION = '1.110';
3 # ABSTRACT: The get command of kube_client
4 use Moo;
5 use MooX::Cmd;
6  
7  
8 sub execute {
9 my ($self, $args, $chain) = @_;
10 my $root = $chain->[0];
11  
12 my ($kind, $name) = @$args;
13  
14 unless ($kind) {
15 print STDERR "Usage: kube_client get <Kind> [name]\n";
16 return 1;
17 }
18  
19 my $result;
20 if ($name) {
21 $result = $root->api->get($kind, $name, namespace => $root->namespace);
22 } else {
23 $result = $root->api->list($kind, namespace => $root->namespace);
24 }
25  
26 $root->format_output($result);
27 return 0;
28 }
29  
30  
31 1;
32  
33 __END__