VCI::Abstract::Repository - A repository where version-controlled items are kept.
my $repo = VCI->connect(...); # See VCI.pm for details. my $projects = $repo->projects; my $project = $repo->get_project(name => 'Foo');
As mentioned in VCI, a Repository is a "server" where files are stored by your version-control system.
In some VCSes, it's not really a "server", it's just a directory that contains Projects.
All these accessors are read-only.
root
A string representing the "root" of this repository, in the same format that you'd pass into the command-line client for your VCS. The individual implementations of VCI::Abstract::Repository will describe the format of this string in more detail.
projects
An arrayref of every VCI::Abstract::Project in this repository. In some VCSes, this may just be the projects in the root directory of the repository, or something that doesn't entirely describe everything that's tracked in the system.
vci
The VCI that connected us to this repository. In general, unless you're a VCI implementor, you probably don't care about this.
get_project
Gets a single VCI::Abstract::Repository from the repository, by name.
Takes the following named parameters:
name
The unique name of this Project. Something that uniquely identifies this project in the version control system. Usually, this is just the name of the directory that contains the Project, from the root of the repository.
(For example, mozilla/webtools/bugzilla is the "name" of the Bugzilla project inside of the Mozilla CVS Server.)
mozilla/webtools/bugzilla
The VCI::Abstract::Project that you asked for. Some VCI::VCS implementations will return a valid Project object even if that object doesn't exist in the Repository. The only way to know if a Project is valid is to perform some operation on it.
Some VCI::VCS implementations will return undef if the Project does not exist in the repository.
undef
If there was some other error than that the Project doesn't exist, this method will die.
die
Usually you won't construct an instance of this class directly, but instead, use "connect" in VCI to get a Repository object.
new
Takes all "Accessors" of this class as named parameters. The following fields are required: "root" and "vci".
To install VCI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCI
CPAN shell
perl -MCPAN -e shell install VCI
For more information on module installation, please visit the detailed CPAN module installation guide.