From b596cd15890678c3960be59e90a8b649f87cc34f Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@theke.io>
Date: Tue, 10 May 2016 11:00:43 -0300
Subject: [PATCH] Bug 16489: ES code incorrectly refers to Moose

Probably a leftover from the original SolR code, there are unused references to Moose in the new Elasticsearch code.

To test:
- Run:
  $ git grep Moose
=> FAIL: There are unneeded references to Moose:
Koha/SearchEngine/Zebra/QueryBuilder.pm:use Moose::Role;
Koha/SearchEngine/Zebra/Search.pm:#use Moose::Role;
- Apply the patch
- Run:
  $ git grep Moose
=> SUCCESS: No references to Moose
- Run:
  $ prove t/Search* t/db_dependent/Search*
=> SUCCESS: Tests pass
- Sign off
---
 Koha/SearchEngine/Zebra/QueryBuilder.pm | 5 +++--
 Koha/SearchEngine/Zebra/Search.pm       | 4 ----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Koha/SearchEngine/Zebra/QueryBuilder.pm b/Koha/SearchEngine/Zebra/QueryBuilder.pm
index 7913eb9..0929516 100644
--- a/Koha/SearchEngine/Zebra/QueryBuilder.pm
+++ b/Koha/SearchEngine/Zebra/QueryBuilder.pm
@@ -17,9 +17,10 @@ package Koha::SearchEngine::Zebra::QueryBuilder;
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use base qw(Class::Accessor);
 use Modern::Perl;
-use Moose::Role;
+
+use base qw(Class::Accessor);
+
 use C4::Search;
 use C4::AuthoritiesMarc;
 
diff --git a/Koha/SearchEngine/Zebra/Search.pm b/Koha/SearchEngine/Zebra/Search.pm
index f20f556..cb69e22 100644
--- a/Koha/SearchEngine/Zebra/Search.pm
+++ b/Koha/SearchEngine/Zebra/Search.pm
@@ -17,10 +17,6 @@ package Koha::SearchEngine::Zebra::Search;
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-# I don't think this ever worked right
-#use Moose::Role;
-#with 'Koha::SearchEngine::SearchRole';
-
 use Modern::Perl;
 
 use base qw(Class::Accessor);
-- 
2.7.4