Repository: lucy Updated Branches: refs/heads/overridden_aliases [created] 8972a8442
Adjust for Clownfish fixes to overridden aliases The callback from C to Perl calls the alias '_make_compiler' now, so this is the method that has to be overridden. This is probably confusing for authors of custom queries in Perl and a better fix would be nice. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8972a844 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8972a844 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8972a844 Branch: refs/heads/overridden_aliases Commit: 8972a844208e6acb0698db4b18e265cb4ba072c6 Parents: 83c98ee Author: Nick Wellnhofer <[email protected]> Authored: Wed Jul 30 15:35:48 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Wed Jul 30 15:42:16 2014 +0200 ---------------------------------------------------------------------- perl/buildlib/Lucy/Build/Binding/Search.pm | 2 +- perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod | 6 +++--- perl/lib/LucyX/Search/Filter.pm | 2 +- perl/sample/PrefixQuery.pm | 2 +- perl/t/binding/800-stack.t | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/8972a844/perl/buildlib/Lucy/Build/Binding/Search.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Search.pm b/perl/buildlib/Lucy/Build/Binding/Search.pm index eb3202c..12a2485 100644 --- a/perl/buildlib/Lucy/Build/Binding/Search.pm +++ b/perl/buildlib/Lucy/Build/Binding/Search.pm @@ -607,7 +607,7 @@ sub bind_query { package MyQuery; use base qw( Lucy::Search::Query ); - sub make_compiler { + sub _make_compiler { my ( $self, %args ) = @_; my $subordinate = delete $args{subordinate}; my $compiler = MyCompiler->new( %args, parent => $self ); http://git-wip-us.apache.org/repos/asf/lucy/blob/8972a844/perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod ---------------------------------------------------------------------- diff --git a/perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod b/perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod index 53740de..07fc5b1 100644 --- a/perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod +++ b/perl/lib/Lucy/Docs/Cookbook/CustomQuery.pod @@ -127,10 +127,10 @@ The equals() method determines whether two Queries are logically equivalent: return 1; } -The last thing we'll need is a make_compiler() factory method which kicks out +The last thing we'll need is a _make_compiler() factory method which kicks out a subclass of L<Compiler|Lucy::Search::Compiler>. - sub make_compiler { + sub _make_compiler { my ( $self, %args ) = @_; my $subordinate = delete $args{subordinate}; my $compiler = PrefixCompiler->new( %args, parent => $self ); @@ -140,7 +140,7 @@ a subclass of L<Compiler|Lucy::Search::Compiler>. =head2 PrefixCompiler -PrefixQuery's make_compiler() method will be called internally at search-time +PrefixQuery's _make_compiler() method will be called internally at search-time by objects which subclass L<Lucy::Search::Searcher> -- such as L<IndexSearchers|Lucy::Search::IndexSearcher>. http://git-wip-us.apache.org/repos/asf/lucy/blob/8972a844/perl/lib/LucyX/Search/Filter.pm ---------------------------------------------------------------------- diff --git a/perl/lib/LucyX/Search/Filter.pm b/perl/lib/LucyX/Search/Filter.pm index 0b5a624..75c64ab 100644 --- a/perl/lib/LucyX/Search/Filter.pm +++ b/perl/lib/LucyX/Search/Filter.pm @@ -50,7 +50,7 @@ sub DESTROY { $self->SUPER::DESTROY; } -sub make_compiler { +sub _make_compiler { my ( $self, %args ) = @_; my $subordinate = delete $args{subordinate}; my $compiler http://git-wip-us.apache.org/repos/asf/lucy/blob/8972a844/perl/sample/PrefixQuery.pm ---------------------------------------------------------------------- diff --git a/perl/sample/PrefixQuery.pm b/perl/sample/PrefixQuery.pm index d2d6f17..6b184d3 100644 --- a/perl/sample/PrefixQuery.pm +++ b/perl/sample/PrefixQuery.pm @@ -67,7 +67,7 @@ sub to_string { return "$field{$$self}:$query_string{$$self}"; } -sub make_compiler { +sub _make_compiler { my ( $self, %args ) = @_; my $subordinate = delete $args{subordinate}; my $compiler = PrefixCompiler->new( %args, parent => $self ); http://git-wip-us.apache.org/repos/asf/lucy/blob/8972a844/perl/t/binding/800-stack.t ---------------------------------------------------------------------- diff --git a/perl/t/binding/800-stack.t b/perl/t/binding/800-stack.t index da7b76e..d207f37 100644 --- a/perl/t/binding/800-stack.t +++ b/perl/t/binding/800-stack.t @@ -22,7 +22,7 @@ use base qw( Lucy::Search::Searcher ); package MyQuery; use base qw( Lucy::Search::Query ); -sub make_compiler { +sub _make_compiler { my ( $self, %args ) = @_; my $subordinate = delete $args{subordinate}; my $compiler = MyCompiler->new( %args, parent => $self );
