elasticsearch/elasticsearch-perl — pull request #28 by clintongormley (2014-04-19 12:41:05+00:00)
Title: Added support for Cpanel::JSON::XS

This PR adds support for specifying a particular backend:

$e = Search::Elasticsearch->new( serializer => 'JSON::Cpanel'); # Cpanel::JSON::XS
$e = Search::Elasticsearch->new( serializer => 'JSON::XS'); # JSON::XS
$e = Search::Elasticsearch->new( serializer => 'JSON::PP'); # JSON::PP

The default module will:

* check if Cpanel is already loaded, and if so, use the Cpanel backend
* else check if JSON::XS is already loaded, and if so, use the JSON::XS backend
* else try to load Cpanel and use the Cpanel backend
* else try to load JSON::XS and use the JSON::XS backend
* else try to load JSON::PP and use the JSON::PP backend
* or die