CPAN-API/metacpan-client — pull request #6 by SineSwiper (2014-05-04 21:08:48+00:00)
Title: Don't build a query if a 'body' is already specified

This enables queries like:

my $resultset = $mcpan->module(undef, {
body => ElasticSearch::SearchBuilder->query({
'module.name' => $module,
maturity => 'released',
'module.authorized' => 'true',
'date' => { '>=' => $year, '<=' => 2099 },
}),
});

Prior to this tweak, using a still legal query for `$args` like `{ DUMMY => 1 }` would still work, but using `undef` or `''` makes the intent a bit clearer.