Arch::Changes(3pm) | User Contributed Perl Documentation | Arch::Changes(3pm) |
Arch::Changes - class representing a list of changes
use Arch::Changes qw(:type); use Arch::Tree; my $changes = $tree->get_changes; print $changes->get_listing; use Arch::Log; my $changed = $log->get_changes->is_changed('to', "COPYING"); die "License was compromised" if $changed && $changed->{&MODIFY};
Arch::Changes contains a list of elements, each representing a single tree change. Each change element is described by a hash with the following fields:
The type constants can be conveniently imported using the tag ":type".
use Arch::Changes qw(:type);
The following methods are available:
new, add, count, get, get_listing, is_changed, dump, type_string, to_string.
Typically it is called indirectly from method get_changes in Arch::Changeset, Arch::Tree or Arch::Log class.
Typically it is called indirectly from method get_changes in Arch::Changeset, Arch::Tree or Arch::Log class.
If filepath is not modified by any changes, return undef.
Otherwise, return hash with possible keys ADD, DELETE, MODIFY, META_MODIFY and RENAME. The hash values are 1 in all cases except for RENAME, then the value is the file name on the opposite side (i.e., the source of RENAME if to is true, and the destination if false).
Note, the valid return values for arch are: undef, hashref with one key (ADD or DELETE) or hashref with combination of one-to-three keys (MODIFY, META_MODIFY and RENAME).
Awaiting for your reports.
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).
For more information, see tla, Arch::Changeset, Arch::Tree, Arch::Log.
2005-10-23 | perl v5.20.2 |