Subject: | [PATCH] Fix arg unpacking in Query::Manual::consistent |
"consistent" is supposed to take three args. "Query::Manual::consistent" doesn't, so the provided filter function receives the database handle instead of the object itself, making the whole thing rather useless!
(First submitted at https://github.com/ruoso/search-gin/pull/2. Do you prefer patches via Github or here?)
Subject: | fix-arg-unpacking.patch |
diff --git a/lib/Search/GIN/Query/Manual.pm b/lib/Search/GIN/Query/Manual.pm
index 097a1f9..f9eb65a 100644
--- a/lib/Search/GIN/Query/Manual.pm
+++ b/lib/Search/GIN/Query/Manual.pm
@@ -49,7 +49,7 @@ sub extract_values {
}
sub consistent {
- my ( $self, $obj ) = @_;
+ my ( $self, $index, $obj ) = @_;
if ( my $filter = $self->filter ) {
return $obj->$filter;