James G Smith > Gestinanna-0.02 > Gestinanna::POF::Secure::Gestinanna::RepositoryObject

Download:
Gestinanna-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Gestinanna::POF::Secure::Gestinanna::RepositoryObject - basic support for a revision controlled repository

SYNOPSIS ^

 package My::Files;

 use Gestinanna::POF::Repository qw(Files);

Creates the packages My::Files::Object, My::Files::Tag, and My::Files::Description. Use My::Files::Object as the main POF object.

DESCRIPTION ^

A repository (for the purposes of this module) is a collection of revision-controlled objects in an RDBMS accessed through Alzabo.

SCHEMA ^

The repository expects the following schema. This assumes use Gestinanna::POF::Repository qw(Prefix).

Table `Prefix'

This is the primary object store and has the following columns. Additional text columns named data or starting with data_ may be added. These columns are then the default set of revision-controlled columns.

prefix

This is the unique id of the object revision. This may be used to establish relationships with other tables.

name

This is the name of the object. The name and revision (together) must be unique.

revision

This is the revision of the object. This is a text string of period (.) separated numbers following the RCS/CVS convention for denoting branches and versions.

modify_timestamp

This is the timestamp of the revision (when it was saved to the RDBMS).

user_type

This is the type of the user that created the revision.

user_id

This is the id of the user that created the revision.

log

This is any log text added by the user when the revision was created.

Table `Prefix_Tag'

This table maps tags and names to revisions. Any tag and name combination must be unique.

tag

This is the name of the tag. This is part of the primary key.

name

This is the name of the tagged object. This is also part of the primary key.

revision

This is the revision of the object the tag points to.

Table `Prefix_Drescription'

This table is for convenience. It holds metadata that is not tied to a particular revision.

name

This is the name of the object being described.

description

This is a text description of the object.

METHODS ^

While the repository classes are based on Gestinanna::POF::Alzabo, they extend the functionality to allow management of the repository while still allowing simple use of the objects within the repository.

Description Class

This class is directly based on Gestinanna::POF::Alzabo and does not behave any differently than would be expected. See Gestinanna::POF::Alzabo for more information.

If the description of an object is deleted and the Alzabo schema is enforcing data integrity, then all revision history for the object will be deleted as well.

Object Class

The object_id is the name of the object (object_id is an alias for name in the constructor). If revision is given, then that revision is loaded. If no revision is given but a tag_path is supplied, then the tags are searched until one is found pointing to a revision of the named object.

Saving an object will not modify any existing row in the RDBMS but will create a new row storing the differences between that version of the object and the previous version. If a more recent version of the object exists in the branch, then a new branch is created. Otherwise, a new revision is created in the same branch.

What is done during a save may be modified by calling branch or merge beforehand.

Revision numbers are Perl ordinal strings. For example, v1.1 is the first revision of the first branch. v1.1.1.1 is the first revision of the first branch of the first revision of the first branch. Etc. This is an added feature in Perl 5.6.0.

Tag Class

AUTHOR ^

COPYRIGHT ^