I am using Perl wrapper for Elasticsearch: "Search::Elasticsearch" I create an object as follows:
use Search::Elasticsearch; my $e = Search::Elastic