package Kubectl::CLIWrapper {
use Moo;
use IPC::Open3;
use JSON::MaybeXS;
use Kubectl::CLIWrapper::Result;
use Type::Tiny::Union;
use Types::Standard qw/Str CodeRef Bool/;
our $VERSION
undef, @command);
}
sub json {
my ($self, @command) = @_;
push @command, '-o=json';
my $result = $self->run(@command);
my $struct = eval {
JSON->new->decode($result->outpu
Kubectl::CLIWrapper::Result->new(
rc => $result->rc,
output => $result->output,
json => $struct
);
}
sub input {
my ($self, $input, @params) = @_;
my @final_command