Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixup
  • Loading branch information
ranguard committed May 12, 2017
1 parent ba10f79 commit 28ad351
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/MetaCPAN/Model/Search.pm
Expand Up @@ -11,6 +11,9 @@ use List::Util qw( sum uniq );
use MetaCPAN::Types qw( Object Str );
use MetaCPAN::Util qw( single_valued_arrayref_to_scalar );

# Read in here to share
my $json = do { local $/; <DATA>; };

has es => (
is => 'ro',
isa => Object,
Expand Down Expand Up @@ -253,8 +256,6 @@ sub build_query {
$params //= {};

# ( my $clean = $search_term ) =~ s/::/ /g;

my $json = do { local $/; <DATA>; };
my $structure = decode_json $json;

my $multi_match = $structure->{query}->{bool}->{must} #
Expand Down Expand Up @@ -289,7 +290,7 @@ sub build_query {
];

my $search = merge(
$structure,
$params,
{
_source => "module",
fields => [
Expand Down

0 comments on commit 28ad351

Please sign in to comment.