sword with the "op" CLI
use v5.36.0;
use Carp ();
use IPC::Run qw(run timeout);
use JSON::MaybeXS qw(decode_json);
#pod =head1 SYNOPSIS
#pod
#pod B<Achtung!> The interface for this library might c
rmat', 'json'),
$locator->item,
);
local $ENV{OP_ACCOUNT} = $locator->account // $ENV{OP_ACCOUNT};
open(my $proc, '-|', @op_command) or Carp::croak("can't spawn op: $!");
my $json = join
s, 2024-05-03
close($proc) or Carp::croak("problem running 'op item get'");
return decode_json($json);
}
#pod =method get_field
#pod
#pod my $str = $one_pw->get_field($locator);
#pod
#pod This