Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
Search::GIN::Extract::ClassMap::Role - The ClassMap core role for generally representing all the user config.
VERSION
version 0.01060815
SYNOPSIS
{
package Foo;
use MooseX::Role;
with 'Search::GIN::Extract::ClassMap::Role';
sub matches {
my ( $self, $object );
my @m;
for ( $self->classmap_entries ) {
if( $object->some_criteria( $_ ) ) {
push @m, $self->classmap_get( $_ );
}
}
return @m;
}
}
REQUIRED METHODS
matches
Must take an object and return a list of Search::GIN::Extract items to use for it
signature: ->matches( $object )
returns: Search::GIN::Extract @items
ATTRIBUTES
classmap
This is a key => value pair set mapping classes to some Extractor to use for that class
types:
HashRef [ "Extractor" in Search::GIN::Extract::ClassMap::Types ]
"CoercedClassMap" in Search::Extract::ClassMap:Types
provides:
classmap_entries
classmap_set
classmap_get
METHODS
extract_values
extracts values from all matching rules for the object
signature: ->extract_values( $object )
AUTHOR
Kent Fredric <kentnl@cpan.org>
COPYRIGHT AND LICENSE
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.