package APKPM::Gearman;

use Moose::Role;

use Data::Dump qw(dump);
use JSON::XS;

sub e_json {
	my ( $self, $result ) = @_;
	warn "# e_json ", dump $result;
	return JSON::XS::encode_json($result);
}

sub d_json {
	my ( $self, $workload ) = @_;
	warn "# d_json $workload";
	return JSON::XS::decode_json($workload);
}

sub d_array {
	my ( $self, $result ) = @_;
	warn "# d_array $result";
	return [ split(/\s+/,$result) ];

}

1;
