rializing / unserializing
use Data::Compare;
use Data::Dumper;
use JSON;
# serialize hashes with the same key order:
my $json = JSON->new->allow_nonref->canonical->utf8;
use Data::UUID;
use File::Pa
hashref into string (to be passed to Gearman)
#
# Parameters:
# * hashref that is serializable by JSON module (may be undef)
#
# Returns:
# * a string (string is empty if the hashref is undef)
#
# Di
def;
eval {
$hashref_serialized = $json->encode( $hashref );
# Try to deserialize, see if we get the same hashref
my $hashref_deserialized = $json->decode($hashref_serialized);
unless (
my_variable>) will be discarded after
each run.
Returns result on success (serializable by the L<JSON> module). The result
will be discarded if the job is ordered on Gearman as a background process.
) C<$args> (hashref), arguments required for running the
Gearman function (serializable by the L<JSON> module)
=item * (optional) instance of Gearman::JobScheduler::Configuration to be used by the w
nal) C<$args> (hashref), arguments needed for running the Gearman
function (serializable by the L<JSON> module)
=item * (optional) Instance of Gearman::JobScheduler::Configuration to be used by the c