VCI::Abstract::Diff::File - The changes made to a particular file, in a Diff.


VCI documentation Contained in the VCI distribution.

Index


Code Index:

NAME

Top

VCI::Abstract::Diff::File - The changes made to a particular file, in a Diff.

DESCRIPTION

Top

Diffs are basically lists of changes made to files. So this represents the modifications made to just one file in a Diff.

NOTE: The interface of this module is particularly unstable. The names and types of the accessors may drastically change in some future release.

METHODS

Top

Accessors

All accessors are read-only.

changes

An arrayref of Text::Diff::Parser::Change objects, representing the changes made to this file.

path

A string representing the path of the file that's been changed, relative to the base of the Project the Diff is related to.

CLASS METHODS

Top

Constructor

Usually you won't construct an instance of this class directly, but instead, use files in VCI::Abstract::Diff.

new

Takes all Accessors as named parameters. The following fields are required: changes, and path.


VCI documentation Contained in the VCI distribution.

package VCI::Abstract::Diff::File;
use Moose;

use VCI::Util;

has 'changes'  => (is => 'ro', isa => 'ArrayRef[Text::Diff::Parser::Change]',
                   required => 1);
# XXX Eventually this should be replaced with a VCI::Abstract::File
has 'path'     => (is => 'ro', isa => 'Str', required => 1);

__PACKAGE__->meta->make_immutable;

1;

__END__