NAME
Document::Object
SYNOPSIS
my $doc = new Document::Object;
$doc->state($state, $comment);
my $cid = $doc->comment( undef, { author => "Me", subject => "My Subject", text => "Comment to be appended" } ); my @comments = $doc->comment(); my $comment = $doc->comment(42);
my $text = $doc->diff($revA, $revB);
my $wid = $doc->watcher( undef, { name => "Me", email => "myself@mydomain.com" } );
DESCRIPTION
This class encapsulates information about a generic document and operations for altering its properties. A document is assumed to be a collection of one or more files, with metadata.
FUNCTIONS
new()
Creates a new document object.
get_error()
Retrieves the most recent error message
log
Gets or adds comments in change log
content($filename[, $content])
Retrieves the contents of a file in the document from the repository, or, if $content is defined, stores the content into the file.
state([$state[, $comment]])
Gets or sets the state of the document.
properties()
Returns a hash of general properties about the document
comment([$cid], [$comment])
Gets or sets the comment information for a given comment ID $cid, or adds a new $comment if $cid is not defined, or returns all of the comments if neither parameter is specified.
keywords([@keywords])
Gets or sets the list of keywords for the document.
watcher([$cid], [$comment])
Gets or sets the watcher information for a given watcher ID $wid, or adds a new $watcher if $wid is not defined, or returns all of the watchers if neither parameter is specified.