Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    VCS::File 0.14

    Download button

    No screenshots available
    Downloads: 615  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.3/5)
    6 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Greg McCarroll | More programs
    Perl Artistic License / FREE
    July 15th, 2008, 01:11 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    VCS::File description

    VCS::File is a Perl module for access to a file under version control.

    VCS::File is a Perl module for access to a file under version control.

    SYNOPSIS

    use VCS;
    my $f = VCS::File->new($url);
    print $f->url . "n";
    foreach my $v ($f->versions) {
    print "tversion: " . $v->version . "t" . ref($v) . "n";
    }

    VCS::File abstracts access to a file under version control.

    METHODS

    Methods marked with a "*" are not yet finalised/implemented.
    VCS::File->create_new($name) *

    $name is a file name, absolute or relative. Creates data as appropriate to convince the VCS that there is a file, and returns an object of class VCS::File, or throws an exception if it fails. This is a pure virtual method, which must be over-ridden, and cannot be called directly in this class (an exception ("die") will result).
    VCS::File->introduce($version_args) *

    $version_args is a hash-ref, see VCS::Version for details. Implementation classes are expected to use something similar to this code, to call create_new in the right VCS::Version subclass:

    sub introduce {
    my ($class, $version_args) = @_;
    my $call_class = $class;
    $call_class =~ s/[^:]+$/Version/;
    return $call_class->create_new($version_args);
    }

    This is a pure virtual method, which must be over-ridden, and cannot be called directly in this class (a die will result).
    VCS::File->new($url)

    $url is a file URL. Returns an object of class VCS::File, or throws an exception if it fails. Normally, an override of this method will call VCS::File->init($url) to make an object, and then add to it as appropriate.
    VCS::File->tags()

    Returns a reference to a hash that has keys that are any tags attached to the file and the values are the corresponding versions which the tags refer to.
    VCS::File->tags_hash()

    Cvs ONLY

    Same as for ->.
    VCS::File->tags_array()

    Cvs ONLY

    Returns an array of tags that are connected with the file, this is useful alongside tags_hash() as it allows you to inspect the order in which tags were applied.
    VCS::File->init($url)

    $url is a file URL. Returns an object of class VCS::File. This method calls VCS->parse_url to make sense of the URL.
    $file->url

    Returns the $url argument to new.
    $file->versions

    Returns a list of objects of class VCS::Version, in order of ascending revision number. If it is passed an extra (defined) argument, it only returns the last version as a VCS::Version.
    $file->path

    Returns the absolute path of the file.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    version control | VCS access | Perl module | VCS | version | control

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM