NAME

Rcs - Perl Class for Revision Control System (RCS).


SYNOPSIS

    use Rcs;


DESCRIPTION

This Perl module provides an object oriented interface to access Revision Control System (RCS) utilities. RCS must be installed on the system prior to using this module. This module should simplify the creation of an RCS front-end.


OBJECT CONSTRUCTOR

The new method may be used as either a class method or an object method to create a new object.

    # called as class method
    $obj = Rcs->new;

    # called as object method
    $newobj = $obj->new;


CLASS METHODS

Besides the object constructor, there are two class methods provided which effect any newly created objects.

The bindir method sets the directory path where the RCS executables (i.e. rcs, ci, co) are located. The default location is '/usr/local/bin'.

    # set RCS bin directory
    Rcs->bindir('/usr/bin');

    # access RCS bin directory
    $bin_dir = Rcs->bindir;

The quiet method sets/unsets the quiet mode for the RCS executables. Quiet mode is set bt default.

    # set/unset RCS quiet mode
    Rcs->quiet(0);      # unset quiet mode
    Rcs->quiet(1);      # set quiet mode

    # access RCS quiet mode
    $quiet_mode = Rcs->quiet;

These methods may also be called as object methods.

    $obj->bindir('/usr/bin');
    $obj->quiet(0);


OBJECT ATTRIBUTE METHODS

These methods set the attributes of the RCS object.

The file method is used to set the name of the RCS working file. The filename must be set before invoking any access of modifier methods on the object.

    $obj->file('mr_anderson.pl');

The arcfile method is used to set the name of the RCS archive file. Using this method is optional, as the other methods will assume the archive filename is the same as the working file unless specified otherwise. The ',v' RCS archive extension is automatically added to the filename.

    $obj->arcfile('principle_mcvicker.pl');

The workdir methods set the path of the RCS working directory. If not specified, default path is '.' (current working directory).

    $obj->workdir('/usr/local/source');

The rcsdir methods set the path of the RCS archive directory. If not specified, default path is './RCS'.

    $obj->rcsdir('/usr/local/archive');


RCS PARSE METHODS

This class provides methods to directly parse the RCS archive file.

The access method returns a list of all user on the access list.

    @access_list = $obj->access;

The author method returns the author of the revision. The head revision is used if no revision argument is passed to method.

    # returns the author of revision '1.3'
    $author = $obj->author('1.3');

    # returns the authos of the head revision
    $author = $obj->author;

The head method returns the head revision.

    $head = $obj->head;

The lock method returns the locker of the revision. The method returns null if the revision is unlocked. The head revision is used if no revision argument is passed to method.

    # returns locker of revision '1.3'
    $locker = $obj->lock('1.3');

    # returns locker of head revision
    $locker = $obj->lock;

The revisions method returns a list of all revisions of archive file.

    @revisions = $obj->revisions;

The state method returns the state of the revision. The head revision is used if no revision argument is passed to method.

    # returns state of revision '1.3'
    $state = $obj->state('1.3');

    # returns state of head revision
    $state = $obj->state;

The sysbol method returns the sysbol(s) associated with a revision. If called in list context, method returns all symbols associated with revision. If called in scalar context, method returns last symbol assciated with revision. The head revision is used if no revision argument is passed to method.

    # list context, returns all symbols associated with revision 1.3
    @symbols = $obj->symbol('1.3');

    # list context, returns all symbols associated with head revision
    @symbols = $obj->symbol;

    # scalar context, returns last symbol associated with revision 1.3
    $symbol = $obj->symbol('1.3');

    # scalar context, returns last symbol associated with head revision
    $symbol = $obj->symbol;


RCS SYSTEM METHODS

These methods invoke the RCS system utilities.

The ci method calls the RCS ci program.

    # check in, and then check out in unlocked st) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl

testdb_dynamic :: pure_all
	PERL_DL_NONLAZY=1 $(FULLPERL) $(TESTDB_SW) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)

test_ : test_dynamic

test_static :: test_dynamic
testdb_static :: testdb_dynamic


# --- MakeMaker pm_to_blib section:

pm_to_blib: $(TO_INST_PM)
	@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
	"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
        -e "pm_to_blib({qw{$(PM_TO