Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Automatically collect index metadata from MooseX::AttributeIndexes consuming models

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .perltidyrc
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 README.mkdn
Octocat-spinner-32 dist.ini
Octocat-spinner-32 perlcritic.rc
Octocat-spinner-32 weaver.ini
README.mkdn

NAME

Search::GIN::Extract::AttributeIndexes - Automatically collect index metadata from MooseX::AttributeIndexes consuming models.

VERSION

version 1.0.2

SYNOPSIS

On your models

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
  );
}

In KiokuX::Model extensions

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;

  }
}

In Instantiations of KiokuDB

my $dir = KiouDB->new(
  backend => KiokuDB::Backend::BDB::GIN->new(
    extract => Search::GIN::Extract::AttributeIndexes->new()
  )
);

AUTHOR

Kent Fredric kentnl@cpan.org

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 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.

Something went wrong with that request. Please try again.