Algorithm-Diff-Callback
view release on metacpan or search on metacpan
lib/Algorithm/Diff/Callback.pm view on Meta::CPAN
=head1 NAME
Algorithm::Diff::Callback - Use callbacks on computed differences
=head1 VERSION
version 0.111
=head1 SYNOPSIS
Use callbacks in your diff process to get better control over what will happen.
use Algorithm::Diff::Callback 'diff_arrays';
diff_arrays(
\@old_family_members,
\@new_family_members,
added => sub { say 'Happy to hear about ', shift },
deleted => sub { say 'Sorry to hear about ', shift },
);
lib/Algorithm/Diff/Callback.pm view on Meta::CPAN
=head1 DESCRIPTION
One of the difficulties when using diff modules is that they assume they know
what you want the information for. Some give you formatted output, some give you
just the values that changes (but neglect to mention how each changed) and some
(such as L<Algorithm::Diff>) give you way too much information that you now have
to skim over and write long complex loops for.
L<Algorithm::Diff::Callback> let's you pick what you're going to diff (Arrays or
Hashes) and set callbacks for the diff process.
=head1 EXPORT
You'll need to declare to explicitly export these functions.
=head2 diff_arrays
=head2 diff_hashes
use Algorithm::Diff::Callback qw<diff_arrays diff_hashes>;
( run in 0.383 second using v1.01-cache-2.11-cpan-8d75d55dd25 )