Search::GIN::Extract::AttributeIndexes - Automatically collect index metadata from MooseX::AttributeIndexes consuming models.
version 1.0.1
use MooseX::Declare; class Model::Item { use MooseX::Types::Moose qw(:all ): use MooseX::AttributeIndexes; has 'attr' => ( isa => Str, is => 'rw', indexed => 1 ); has 'attr_bar' => ( isa => Str, is => 'rw', primary_index => 1 ); }
use MooseX::Declare; class Foo extends KiokuX::Model { use Search::GIN::Extract::AttributeIndexes; around _build_connect_args ( Any @args ) { my $args = $self->$orig( @args ); push @{ $args }, extract => Search::GIN::Extract::AttributeIndexes->new(); return $args; } }
my $dir = KiouDB->new( backend => KiokuDB::Backend::BDB::GIN->new( extract => Search::GIN::Extract::AttributeIndexes->new() ) );
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2011 by Kent Fredric.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Search::GIN::Extract::AttributeIndexes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::GIN::Extract::AttributeIndexes
CPAN shell
perl -MCPAN -e shell install Search::GIN::Extract::AttributeIndexes
For more information on module installation, please visit the detailed CPAN module installation guide.