Cory G Watson > Data-SearchEngine-0.32 > Data::SearchEngine::Item

Download:
Data-SearchEngine-0.32.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.32   Source   Latest Release: Data-SearchEngine-0.33

NAME ^

Data::SearchEngine::Item - An individual search result.

VERSION ^

version 0.32

SYNOPSIS ^

  my $results = Data::SearchEngine::Results->new;

  $results->add(Data::SearchEngine::Item->new(
    id => 'SKU',
    values => {
        name => 'Foobar',
        description => 'A great foobar!'
    },
    score => 1.0
  ));

DESCRIPTION ^

An item represents an individual search result. It's really just a glorified HashRef.

ATTRIBUTES ^

id

A unique identifier for this item.

score

The score this item earned.

values

The name value pairs for this item.

METHODS ^

keys

Returns the keys from the values HashRef, e.g. a list of the value names for this item.

get_value

Returns the value for the specified key for this item.

set_value

Sets the value for the specified key for this item.

AUTHOR ^

Cory G Watson <gphat@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Cold Hard Code, LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: