README
1NAME
2 VCS - Version Control System access in Perl
3
4SYNOPSIS
5 use VCS;
6 $file = VCS::File->new($ARGV[0]);
7 print $file->url, ":\n";
8 for $version ($file->versions) {
9 print $version->version,
10 ' was checked in by ',
11 $version->author,
12 "\n";
13 }
14
15DESCRIPTION
16 "VCS" is an API for abstracting access to all version control systems
17 from Perl code. This is achieved in a similar fashion to the "DBI" suite
18 of modules. There are "container" classes, "VCS::Dir", "VCS::File", and
19 "VCS::Version", and "implementation" classes, such as "VCS::Cvs::Dir",
20 "VCS::Cvs::File", and "VCS::Cvs::Version", which are subclasses of their
21 respective "container" classes.
22
23 The container classes are instantiated with URLs. There is a URL scheme
24 for entities under version control. The format is as follows:
25
26 vcs://localhost/VCS::Cvs/fs/path/?query=1
27
28 The "query" part is ignored for now. The path must be an absolute path,
29 meaningful to the given class. The class is an implementation class,
30 such as "VCS::Cvs".
31
32 The "container" classes work as follows: when the "new" method of a
33 container class is called, it will parse the given URL, using the
34 "VCS->parse_url" method. It will then call the "new" of the
35 implementation's appropriate container subclass, and return the result.
36 For example,
37
38 VCS::Version->new('vcs://localhost/VCS::Cvs/fs/path/file/1.2');
39
40 will return a "VCS::Cvs::Version".
41
42 An implementation class is recognised as follows: its name starts with
43 "VCS::", and "require "VCS/Classname.pm"" will load the appropriate
44 implementation classes corresponding to the container classes.
45
46VCS METHODS
47 VCS->parse_url
48 This returns a four-element list:
49
50 ($hostname, $classname, $path, $query)
51
52 For example,
53
54 VCS->parse_url('vcs://localhost/VCS::Cvs/fs/path/file/1.2');
55
56 will return
57
58 (
59 'localhost',
60 'VCS::Cvs',
61 '/fs/path/file/1.2',
62 ''
63 )
64
65 This is mostly intended for use by the container classes, and its
66 interface is subject to change.
67
68 VCS->class_load
69 This loads its given implementation class.
70
71 This is mostly intended for use by the container classes, and its
72 interface is subject to change.
73
74VCS::* METHODS
75 Please refer to the documentation for VCS::Dir, VCS::File, and
76 VCS::Version; as well as the implementation specific documentation as in
77 VCS::Cvs, VCS::Rcs.
78
79AUTHORS
80 Greg McCarroll <greg@mccarroll.org.uk>
81 Leon Brocard
82 Ed J
83
84KUDOS
85 Thanks to the following for patches,
86
87 Richard Clamp
88 Pierre Denis
89 Slaven Rezic
90
91COPYRIGHT
92 Copyright (c) 1998-2003 Leon Brocard & Greg McCarroll. All rights
93 reserved. This program is free software; you can redistribute it and/or
94 modify it under the same terms as Perl itself.
95
96SEE ALSO
97 VCS::Cvs, VCS::Dir, VCS::File, VCS::Rcs, VCS::Version.
98
99