The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VCS::Rcs::Parser - Perl extension for RCSfile Parsing

SYNOPSIS

  use VCS::Rcs::Parser;

  # Read a *,v file into $text
  $text = do {local $/; <>};

  my $rcs = VCS::Rcs::Parser->new(\$text); # Checkout all the revisions

  or
 
  my $rcs = VCS::Rcs::Parser->new(\$text, 
                                  dates=> ['2001.01.01', '2001.03'],
                                  revs => ['1.1', '1.5'] )
                or warn "Error Parsing $file\n";

  my $dates = $rcs->revs(index => 'date'); # ref. to a hash ( dates=>revs )
  my $revs  = $rcs->revs(index => 'rev' ); # ref. to a hash ( revs=>dates )

  print $rcs->co(rev => '1.1');
  print $rcs->co(date => '2001.01.01');

DESCRIPTION

Reads a ',v' RCS revisions file and checks out every revision into core.

METHODS

new: Takes one mandatory parameter, which is a referance to the Scalar containing the revision file. And two optionals, date=>[], and revs=>[] with the list of dates or revisions to be read into core.

revs: takes one parametre, index=>'' with a value 'date' or 'rev'. this method lists the revisions put in the memory in to a hash referance, dates as the keys, or revisions respectivly.

co: Accepts one parametre rev, or date, with the value revision or date. Returns a scalar containing the revision.

BUGS

* 0.04 has a memory leak!!! upgrade

* 'CO' algoritm does not follow branches, or even 'next's. It only follows the order deltatext is written to the ,v revision file.

* Probably more!

AUTHOR

Ziya Suzen, ziya@ripe.net

SEE ALSO

perl(1).