2 # A light shim over Mojo::IOLoop::Subprocess (or Mojo::IOLoop::ForkCall, if we need to go back to that)
4 # But we stop using Storable!
13 use Mojo::IOLoop::Subprocess;
16 our @ISA = qw(Mojo::IOLoop::Subprocess);
21 my $class = ref $pkg || __PACKAGE__;
22 my $ref = Mojo::IOLoop::Subprocess->new->serialize(\&freeze)->deserialize(\&thaw);
23 return bless $ref, $class;
31 LogDbg('DXUser', "DXSubcommand::freeze: undefined or empty input");
35 eval { $r = encode_json($j) };
38 LogDbg('DXUser', "DXSubcommand::freeze: json error on '$dd': $@");
49 LogDbg('DXUser', "DXSubcommand::thaw: empty string on input");
53 return [undef, [1]] unless $j;
54 eval { $r = decode_json($j) };
56 LogDbg('DXUser', "DXSubcommand::thaw: json error on '$j': $@");