VCI::Abstract::Committable - Anything that can be committed to a repository.
This is a Moose::Role that represents any item that can be committed to a repository. In other words, a File or a Directory.
It represents it at a specific time in its history, so it has a revision identifier and time.
When you call new on a Committable, if you don't specify revision and time, then we assume that you're talking about the most recent version that's in the repository, and "revision" and "time" will return the revision and time of the most recent revision.
new
revision
time
You cannot specify "time" without specifying "revision", in the constructor.
All accessors are read-only.
A lot of these accessors have to do with revision identifiers. Some committables (such as directories) might not have revision identifiers of their own in certain types of version-control systems. In this case, the revision identifiers will be an empty string or something specified by the VCI::VCS implementation, but they will still have revision times. (</first_revision> and "last_revision" might be equal to each other, though.)
These are accessors that don't tell you about this particular file or directory, but actually tell you about its history in the repository.
history
A VCI::Abstract::History representing the history of all commits to this item.
Note that this VCI::Abstract::History object is only guaranteed to have information about this file or directory--it may or may not contain information about commits to other items.
first_revision
A VCI::Abstract::Committable representing the earliest revision for this item in the current Project.
This will be the same type of Committable as the current one. (For example, if this is a VCI::Abstract::File, then first_revision will also be a VCI::Abstract::File.)
last_revision
A VCI::Abstract::Committable representing the most recent revision for this item in the current Project.
This will be the same type of Committable as the current one. (For example, if this is a VCI::Abstract::File, then last_revision will also be a VCI::Abstract::File.)
This is the current revision and time of the specific item you're looking at right now. If you're looking at an old verion of the file/directory, it may not be the same as the information about the most recent revision.
The revision identifier of the particular item that you're dealing with right now.
A datetime representing the time that this revision was committed to the repository.
path
The Path of this file, from the root of the project, including its filename if it's a file.
In most version-control systems, this will never change, but there are some modern systems that understand the idea of moving or renaming a file, so this could be different at different points in history.
name
The particular name of just this item, without its full path. If it's a directory, it will just be the name of the directory (without any separators like /).
/
Just like "path", this may change over time in some version-control systems.
For the root directory of a project, this will be an empty string.
parent
The VCI::Abstract::Directory that contains this item. If this is the root directory of the Project, then this will be undef.
undef
The most reliable way to check if this is the root directory is to see if this accessor returns undef.
project
The VCI::Abstract::Project that this committable is in.
Implementors: VCI::Abstract::File and VCI::Abstract::Directory
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.