Houston PMs,I have a catch 22 that I cannot figure out. I need both JSON::PP
(for sort_by capability on encoding) and JSON::XS (for performance on
decoding). We are moving from EL5 to EL6 but the JSON libs are not really
consistent between the environments. Has anyone else worked through this
fiasco and have any best practices on how to get past this?Thanks,Mike #use
JSON perl version for sort_by for interoperability with crappy Windows
service$self->json->sort_by(sub {no warnings
q{uninitialized};$sorter->{$JSON::PP::a} <=>
$sorter->{$JSON::PP::b}});$self->json->encode($data_input); #use JSON:XS
version for performance with VERY large returnsreturn
$self->jsonxs->decode($json_return); So, it looks like I need to do something
like this. if ('some logic to figure out running on EL5 vs EL6 like load JSON
and see if JSON->can("sort_by")') {use JSON::PP qw{}; #we require
JSON::PP->sort_by
} else {use JSON qw{}; #we require JSON::PP->sort_by
} mrdvt92_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/