Search::Tools::Object - base class for Search::Tools objects
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";
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.
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.
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.
PERL_DEBUG
Peter Karman <karman@cpan.org>
<karman@cpan.org>
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.
bug-search-tools at rt.cpan.org
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 2009 by Peter Karman.
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search::QueryParser
To install Search::Tools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Tools
CPAN shell
perl -MCPAN -e shell install Search::Tools
For more information on module installation, please visit the detailed CPAN module installation guide.