VCS::Rcs::Parser - Perl extension for RCSfile Parsing
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');
Reads a ',v' RCS revisions file and checks out every revision into core.
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.
* 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!
Ziya Suzen, ziya@ripe.net
perl(1).
To install VCS::Rcs::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCS::Rcs::Parser
CPAN shell
perl -MCPAN -e shell install VCS::Rcs::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.