NAME
Catalyst::Model::Estraier - Hyper Estraier model class for Catalyst
SYNOPSIS
# Use the Catalyst helper
$ perl script/myapp_create.pl model Search Estraier \
http://localhost:1978/node/test admin admin
# Or, in lib/MyApp/Model/Search.pm
package MyApp::Model::Search;
use base qw(Catalyst::Model::Estraier);
__PACKAGE__->config(
url => 'http://localhost:1978/node/test',
user => 'admin',
passwd => 'admin',
croak_on_error => 1,
);
1;
# Then, in your controller
my $node = $c->model('Search'); # Search::Estraier::Node
my $rs = $node->search($cond, 0);
DESCRIPTION
This is the Search::Estraier model class for Catalyst. It is nothing more than a simple wrapper for Search::Estraier.
Please refer to the Search::Estraier documentation for information on what else is available.
CONFIGURATION
The following configuration parameters are supported:
url
URL to a Hyper Estraier node
user
specify username for node server authentication
passwd
password for authentication
create
create node if it doesn't exists
label
optional label for new node if create is used
debug
dumps a lot of debugging output
croak_on_error
very helpful during development. It will croak on all errors instead of silently returning -1 (which is convention of Hyper Estraier API in other languages).
METHODS
ACCEPT_CONTEXT
Create a Hyper Estraier node using the current configuration and return it. This method is automatically called when you use e.g. $c->model('Search')
.
_node
Accessor for a Hyper Estraier node object. This is a class method.
SEE ALSO
Catalyst::Helper::Model::Estraier Search::Estraier
AUTHOR
Takeru INOUE, <takeru.inoue _ gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2007, Takeru INOUE <takeru.inoue _ gmail.com>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.