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


CouchDB-Deploy documentation  | view source Contained in the CouchDB-Deploy distribution.

Index


NAME

Top

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

SYNOPSIS

Top

    use CouchDB::Deploy;
    ...

DESCRIPTION

Top

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

Top

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

Top

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

BUGS

Top

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

Top


CouchDB-Deploy documentation  | view source Contained in the CouchDB-Deploy distribution.