Search::Tools::Object - base class for Search::Tools objects


Search-Tools documentation  | view source Contained in the Search-Tools distribution.

Index


NAME

Top

Search::Tools::Object - base class for Search::Tools objects

SYNOPSIS

Top

 package MyClass;
 use base qw( Search::Tools::Object );

 __PACKAGE__->mk_accessors( qw( foo bar ) );

 sub init {
    my $self = shift;
    $self->SUPER::init(@_);

    # do stuff to set up object

 }

 1;

 # elsewhere

 use MyClass;
 my $object = MyClass->new;
 $object->foo(123);
 print $object->bar . "\n";

DESCRIPTION

Top

Search::Tools::Object is a subclass of Rose::Object. Prior to version 0.24 STO was a subclass of Class::Accessor::Fast. Backwards compatability for the mk_accessors() and mk_ro_accessors() class methods are preserved via Search::Tools::MethodMaker.

METHODS

Top

init

Overrides base Rose::Object method. Rather than calling the method name for each param passed in new(), the value is simply set in the object as a hash ref. This assumes every Search::Tools::Object is a blessed hash ref.

The reason the hash is preferred over the method call is to support read-only accessors, which will croak if init() tried to set values with them.

debug( n )

Get/set the debug value for the object. All objects inherit this attribute. You can use the PERL_DEBUG env var to set this value as well.

AUTHOR

Top

Peter Karman <karman@cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-search-tools at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-Tools. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Search::Tools




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-Tools

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Search-Tools

* CPAN Ratings

http://cpanratings.perl.org/d/Search-Tools

* Search CPAN

http://search.cpan.org/dist/Search-Tools/

COPYRIGHT

Top

SEE ALSO

Top

Search::QueryParser


Search-Tools documentation  | view source Contained in the Search-Tools distribution.