NAME
Search::Tools::Object - base class for Search::Tools objects
SYNOPSIS
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
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
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
Peter Karman <karman@cpan.org>
BUGS
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
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
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT
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.
SEE ALSO
Search::QueryParser