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

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 2 SCAR 13.9
CC
2
Cov
0%
execute
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 package Kubernetes::REST::CLI::Cmd::Delete;
2 our $VERSION = '1.109';
3 # ABSTRACT: The delete 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 && $name) {
15 print STDERR "Usage: kube_client delete <Kind> <name>\n";
16 return 1;
17 }
18  
19 my $result = $root->api->delete($kind, $name, namespace => $root->namespace);
20 $root->format_output($result);
21 return 0;
22 }
23  
24  
25 1;
26  
27 __END__
28  
29 =pod
30  
31 =encoding UTF-8
32  
33 =head1 NAME
34  
35 Kubernetes::REST::CLI::Cmd::Delete - The delete command of kube_client
36  
37 =head1 VERSION
38  
39 version 1.109
40  
41 =head1 SYNOPSIS
42  
43 kube_client delete <Kind> <name>
44  
45 =head1 DESCRIPTION
46  
47 Implements the C<delete> command of L<Kubernetes::REST::CLI>. Both the kind and
48 the name are required - this command never deletes a whole list. L<MooX::Cmd>
49 finds and loads this class, you do not use it directly.
50  
51 =head2 execute
52  
53 Runs the command. Called by L<MooX::Cmd> with the remaining arguments and the
54 command chain, whose first element is the L<Kubernetes::REST::CLI> root object.
55  
56 =head1 SEE ALSO
57  
58 =over
59  
60 =item * L<Kubernetes::REST::CLI> - CLI base class
61  
62 =back
63  
64 =head1 SUPPORT
65  
66 =head2 Issues
67  
68 Please report bugs and feature requests on GitHub at
69 L<https://github.com/pplu/kubernetes-rest/issues>.
70  
71 =head2 IRC
72  
73 Join C<#kubernetes> on C<irc.perl.org> or message Getty directly.
74  
75 =head1 CONTRIBUTING
76  
77 Contributions are welcome! Please fork the repository and submit a pull request.
78  
79 =head1 AUTHORS
80  
81 =over 4
82  
83 =item *
84  
85 Torsten Raudssus <getty@cpan.org>
86  
87 =item *
88  
89 Jose Luis Martinez Torres <jlmartin@cpan.org>
90  
91 =back
92  
93 =head1 COPYRIGHT AND LICENSE
94  
95 This software is Copyright (c) 2019-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>.
96  
97 This is free software, licensed under:
98  
99 The Apache License, Version 2.0, January 2004
100  
101 =cut