NAME
Catalyst::Model::CouchDB - CouchDB model class for Catalyst
SYNOPSIS
# model
__PACKAGE__->config(
uri => 'http://localhost:5984/',
);
# controller
sub foo : Local {
my ($self, $c) = @_;
eval {
my $doc = $c->model('MyData')->database('foo')->newDoc('bar')->retrieve;
$c->stash->{thingie} = $doc->{dahut};
};
...
}
DESCRIPTION
This model class exposes CouchDB::Client as a Catalyst model.
CONFIGURATION
You can pass the same configuration fields as when you call CouchDB::Client.
METHODS
CouchDB
All the methods not handled locally are forwarded to CouchDB::Client.
new
Called from Catalyst.
AUTHOR
Robin Berjon <robin @t berjon d.t com>, Julien Gilles <jul.gil@gmail.com>
BUGS
Please report any bugs or feature requests to bug-catalyst-model-couchdb at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Model-CouchDB.
COPYRIGHT & LICENSE
Copyright 2008 Robin Berjon, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.