NAME
Document::Manager
SYNOPSIS
my $dms = new Document::Manager;
#TODO - add API
DESCRIPTION
This module provides a simple interface for managing a collection of revision-controlled documents. A document is a collection of one or more files that are checked out, modified, and checked back in as a unit. Each revision of a document is numbered, and documents can be reverted to older revisions if needed. A document can also have an arbitrary set of metadata associated with it.
FUNCTIONS
new($confighash)
Creates a new document manager object.
get_error()
Retrieves the most recent error message
checkout()
Checks out a copy of the document specified by $doc_id, placing a copy into the directory specified by $dir. By default it will return the most recent revision, but a specific revision can be retrieved by specifying $revision.
Returns the filename(s) copied into $dir on success. If there is an error, it returns undef. The error message can be retrieved via get_error().
add()
checkin()
Commits a new revision to the document. Returns the document's new revision number.
query()
Returns a list of documents with property constraints meeting certain conditions.
# TODO
revert()
Reverts the given document to a prior revision number
# TODO
lock()
Locks a document for the given user for a specified period of time
unlock()
Unlocks a document, if it is locked
properties()
Gets or sets the properties for a given document id
stats()
Returns a hash containing statistics about the document repository as a whole, such as number of documents, disk space used, etc.