The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CouchDB::Deploy::Process - The default processor for deploying to CouchDB

SYNOPSIS

    use CouchDB::Deploy;
    ...

DESCRIPTION

This module does the actual dirty job of deploying to CouchDB. Other backends could replace it (though that's not supported yet) and it can be used by other frontends.

METHODS

new $SERVER

Constructor. Expects to be passed the server to which to deploy.

createDBUnlessExists $NAME

Creates the DB with the given name, or skips it if it already exists. Returns true if it did do something.

addDocumentUnlessExistsOrSame $ID, $DATA?, $ATTACH?

Creates the document with the given ID and optional data and attachments. If the document exists it will do its best to find out if the version in the database is the same as the current one (including attachments). If it is the same it will be skipped, otherwise it will be updated. On creation it returns 1, on update 2, and if nothing was done 0.

addDesignDocUnlessExistsOrSame $ID, $DATA

Creates the design doc with the given ID and data. On creation it returns 1, on update 2, and if nothing was done 0.

getFile $PATH

Returns the content of the file in a form suitable for usage in CouchDB attachments. Dies if it can't find the file.

AUTHOR

Robin Berjon, <robin @t berjon d.t com>

BUGS

Please report any bugs or feature requests to bug-couchdb-deploy at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CouchDb-Deploy.

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.