App::KGB::Change - a single file change
my $c = App::KGB::Change->new( { action => "M", prop_change => 1, path => "/there" } ); print $c; my $c = App::KGB::Change->new("(M+)/there");
App::KGB::Change encapsulates a single path change from a given change set (or commit).
App::KGB::Change overloads the "" operator in order to provide a default string representation of changes.
The action performed on the item. Possible values are:
The path was modified.
The path was added.
The path was deleted.
The path was replaced.
The path that was changed.
Boolean. Indicated that some properties of the path, not the content were changed.
More-or-less standard constructor.
It can take a hashref with keys all the field names (See ).
Or, it can take a single string, which is de-composed into components.
See for examples.
Return a string representation of the change. Used by the "" overload. The resulting string is suitable for feeding the constructor if needed.
changes
Given an arrayref of changes (instances of APP::KGB::Change), detects the longest path that is common to all of them. All the changes' paths are trimmed from the common part.
Example:
foo/b foo/x foo/bar/a
would return 'foo' and the paths would be trimmed to
b x bar/a
To install App::KGB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::KGB
CPAN shell
perl -MCPAN -e shell install App::KGB
For more information on module installation, please visit the detailed CPAN module installation guide.