Algorithm::Diff::Apply 0.2.3 review
Download
|
|
Algorithm::Diff::Apply is a Perl module to apply one or more Algorithm::Diff diffs.
SYNOPSIS
## Single-diff form:
use Algorithm::Diff::Apply qw{apply_diff};
my @ary = ...;
my @diff = ...; # some call to Algorithm::Diff::diff()
my @changed_ary = apply_diff(@ary, @diff);
my $changed_ary = apply_diff(@ary, @diff);
## To apply >1 diff at once, use the plural form:
use Algorithm::Diff::Apply qw{apply_diffs};
@newary = apply_diffs(@ary,
diff1_name => @diff1,
diff2_name => @diff2,
...
diffN_name => @diffN);
# Alternatively:
@newary = apply_diffs(@ary, %named_diffs);
# Scalar context:
$newary = apply_diffs(@ary, %named_diffs);
# Extension argument syntax:
$newary = apply_diffs(@ary, {
resolver => &some_sub,
optimisers => [&foo, &bar],
key_generator => &anothersub,
opt4 => ...,
opt5 => ...,
}, %named_diffs);
Requirements:
Perl
Algorithm::Diff::Apply 0.2.3 search tags