| Search-GIN documentation | Contained in the Search-GIN distribution. |
Search::GIN::Callbacks - Provide callbacks
version 0.08
This role provides a few callbacks for Search::GIN.
Yuval Kogman <nothingmuch@cpan.org>
This software is copyright (c) 2010 by Yuval Kogman, Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Search-GIN documentation | Contained in the Search-GIN distribution. |
use strict; use warnings; package Search::GIN::Callbacks; BEGIN { $Search::GIN::Callbacks::VERSION = '0.08'; } # ABSTRACT: Provide callbacks use Moose::Role; with qw(Search::GIN::Core); foreach my $cb ( qw(objects_to_ids extract_values extract_query compare_values consistent ids_to_objects) ) { has "${cb}_callback" => ( isa => "CodeRef", is => "rw", required => 1, ); eval "sub $cb { \$self->${cb}_callback->(@_) }"; } 1;
__END__