Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Rcs::Parser
Parse and analyze RCS files.

Rcs::Parser - Parse and analyze RCS files.


NAME:

Rcs::Parser - Parse and analyze RCS files.


SYNOPSIS:

A basic RCS parser. This file does not rely upon any external utilities to parse RCS files. Currently it functions with RCS files generated by GNU CVS and as documented by the rcsfile(5) man page.


EXAMPLE USAGE:

Retrieve the most recent file from an archive:


  my $rcs = new RCS;

  my $ret = $rcs->load($filename);

  

  my $current = $rcs->recent_version;

To retrieve a specific version:


  my $rcs = new RCS;

  my $ret = $rcs->load($filename);

  

  my $specific_version = $rcs->get('1.2');


METHODS:

author($version)

my $author = $rcs->author($version);

The author method returns the author name of the given version. If no version is given it returns the author of the current loaded version.

date($version)

my $date = $rcs->date($version);

The date method returns the revision date of the given version. If no version is given it returns the date of the current version.

get($version)

my $ret = $rcs->get($version);

This method causes the given version to be retrieved from the archive

load($filename)

my $ret = $rcs->load($filename);

The load command reads in and parses the given filename. If the file does not exist or is unreadable by the script, undef is returned. Otherwise, 1 is returned upon success.

notate()

my $ret = $rcs->notate()

This method builds and assembled statistical information for veriosn.

previous_version()

my $ver = $rcs->previous_version();

This method returns the version previous to the currently instanced version.

recent_version()

my $ver = $rcs->recent_version();

This method returns the most current revision of the file.

version()

my $ver = $rcs->version();

This method returns the currently instanced version.


KNOWN ISSUES:

Beta Code:

This code is alpha. It has yet to fully understand binary formats stored in RCS and will treat them as text. Consquently, you'll see warnings. That being said, there shouldn't be any large scale bugs that will cause segfaulting or crashing. Only warnings.

The RCS file format:

There is an astounding lack of good documentation of the RCS format. About the only thing that can be found is the rcsfile(5) man page. The layout is mostly reverse engineered in this module. I have yet to have the time, or the skill and patience to disassemble the RCS portions of the code for GNU CVS. Maybe soon. :)


ERATTA:


  Q: Why 'Rcs' and not 'RCS'

  A: Because the any directory named 'RCS' is usually ignored by most 

     versioning software and some developer tools.


AUTHORSHIP:


    Rcs::Parser v0.02 2004/04/02

    (c) 2001-2004, Phillip Pollard <bennie@cpan.org>

    Released under the Perl Artistic License
Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy