Apache::CVS::RcsConfig - class that holds configuration information for an


Apache-CVS documentation Contained in the Apache-CVS distribution.

Index


Code Index:

NAME

Top

Apache::CVS::RcsConfig - class that holds configuration information for an RCS object

SYNOPSIS

Top

 use Apache::CVS::RcsConfig();

 $config = Apache::CVS::RcsConfig->new();
 $extension = $config->extension();    
 $working = $config->working();    
 $binary = $config->binary();    

DESCRIPTION

Top

The Apache::CVS::RcsConfig class holds data used to configure an Rcs object.

$config = Apache::CVS::RcsConfig->new([$extension], [$working_directory], [$rcs_binary_directory])

Construct a new Apache::CVS::RcsConfig object. The first argument is the extension of the versioned files. The second argument is the working directory where files may be checked out to. The last argument is the directory that contains the rcs binaries such as: co, rlog, and rcsdiff. The default for these arguments are ',v', '/var/tmp', and /usr/bin'.

$config->extension()

Returns the extension of this configuration.

$config->working()

Returns the working directory of this configuration.

$config->binary()

Returns the path to the RCS binaries stored in this configuration.

SEE ALSO

Top

Apache::CVS, Rcs

AUTHOR

Top

John Barbee <barbee@veribox.net>

COPYRIGHT

Top


Apache-CVS documentation Contained in the Apache-CVS distribution.
# $Id: RcsConfig.pm,v 1.2 2002/04/23 04:19:05 barbee Exp $

package Apache::CVS::RcsConfig;
use strict;

$Apache::CVS::RcsConfig::VERSION = $Apache::CVS::VERSION;

sub new {
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my $self;
    $self->{extension} = shift || ',v';
    $self->{working}   = shift || '/var/tmp';
    $self->{binary}    = shift || '/usr/bin';

    bless ($self, $class);
    return $self;
}

sub extension {
    my $self = shift;
    $self->{extension} = shift if scalar @_;
    return $self->{extension};
}

sub working {
    my $self = shift;
    $self->{working} = shift if scalar @_;
    return $self->{working};
}

sub binary {
    my $self = shift;
    $self->{binary} = shift if scalar @_;
    return $self->{binary};
}

1;