David Leadbeater > Net-CouchDb-0.02 > Net::CouchDb

Download:
Net-CouchDb-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  4
Open  1
View Bugs
Report a bug
Module Version: 0.02   Source  

NAME ^

Net::CouchDb - Interface to CouchDb

VERSION ^

Version 0.01

SYNOPSIS ^

Provides an object oriented interface to the CouchDb REST/JSON API.

    use Net::CouchDb;

    my $cdb = Net::CouchDb->new(host => "localhost", port => 5984);
    $cdb->debug(1);
    $cdb->create_db("test");

    my $test = $cdb->db("test");

    my $doc = Net::CouchDb::Document->new;
    $doc->colours = [qw(blue green orange)];

    $test->put($doc);

METHODS ^

new

Creates a new Net::CouchDb object. Takes the following parameters:

db

Open/connect to a specific database. Returns a Net::CouchDb::Database object.

database

Alias for db.

create_db($name)

Create a new database.

all_dbs

Return a list of all databases

delete_db

Delete a database.

server_info

Returns a data structure with the information from the couchdb "/" URI (notably the version).

debug

Set or get the debug flag (defaults to 0, higher values gives more debug output).

log(debug_level, message, [message, ...])

Log a debug message at debug_level.

call($method, $uri, $data)

Make a REST/JSON call. Normally you should use a more specific method, but this provides low-level access if needed.

Returns a reference to the returned JSON data in scalar context, in array context returns the HTTP status and the reference.

AUTHOR ^

David Leadbeater, <dgl at dgl dot cx>

BUGS ^

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

DEVELOPMENT ^

There is a git repository available at git://code.d.cx/Net-CouchDb, which can be viewed at http://code.d.cx/?p=Net-CouchDb.git.

COPYRIGHT & LICENSE ^

Copyright 2007 David Leadbeater, 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.