Search::Tools::RegExp::Keywords - (**DEPRECATED**) access regular expressions for keywords


Search-Tools documentation Contained in the Search-Tools distribution.

Index


Code Index:

NAME

Top

Search::Tools::RegExp::Keywords - (**DEPRECATED**) access regular expressions for keywords

SYNOPSIS

Top

 # deprecated. See Search::Tools::Query

 


DESCRIPTION

Top

As of version 0.24 this class is deprecated in favor of Search::Tools::Query.

METHODS

Top

re( keyword )

Return Keyword object for keyword.

keywords

Returns array of keywords.

kw

Get/set the Search::Tools::Keywords (deprecated) object.

start_bound

end_bound

hash

array

AUTHOR

Top

Peter Karman perl@peknet.com

Based on the HTML::HiLiter regular expression building code, originally by the same author, copyright 2004 by Cray Inc.

Thanks to Atomic Learning www.atomiclearning.com for sponsoring the development of this module.

COPYRIGHT

Top

SEE ALSO

Top

HTML::HiLiter, Search::Tools::RegExp, Search::Tools::RegExp::Keyword


Search-Tools documentation Contained in the Search-Tools distribution.

package Search::Tools::RegExp::Keywords;
use strict;
use warnings;
use Carp;
use base qw( Search::Tools::Object );
__PACKAGE__->mk_ro_accessors(
    qw(
        kw
        start_bound
        end_bound
        hash
        array
        )
);

our $VERSION = '0.45';

sub keywords {
    my $self = shift;
    return @{ $self->{array} };
}

sub re {
    my $self = shift;
    my $q = shift or croak "need query to get regular expression";
    unless ( exists $self->{hash}->{$q} ) {
        croak "no regexp for query '$q'";
    }
    return $self->{hash}->{$q};
}

1;

__END__