Blame README

Packit Service 61aa35
This is a module for computing the difference between two files, two
Packit Service 61aa35
strings, or any other two lists of things.  It uses an intelligent
Packit Service 61aa35
algorithm similar to (or identical to) the one used by the Unix "diff"
Packit Service 61aa35
program.  It is guaranteed to find the *smallest possible* set of
Packit Service 61aa35
differences.
Packit Service 61aa35
Packit Service 61aa35
This package contains a few parts.
Packit Service 61aa35
Packit Service 61aa35
Algorithm::Diff is the module that contains several interfaces for which
Packit Service 61aa35
computing the differences betwen two lists.
Packit Service 61aa35
Packit Service 61aa35
The several "diff" programs also included in this package use
Packit Service 61aa35
Algorithm::Diff to find the differences and then they format the output.
Packit Service 61aa35
Packit Service 61aa35
Algorithm::Diff also includes some other useful functions such as "LCS",
Packit Service 61aa35
which computes the longest common subsequence of two lists.
Packit Service 61aa35
Packit Service 61aa35
A::D is suitable for many uses.  You can use it for finding the smallest
Packit Service 61aa35
set of differences between two strings, or for computing the most
Packit Service 61aa35
efficient way to update the screen if you were replacing "curses".
Packit Service 61aa35
Packit Service 61aa35
Algorithm::DiffOld is a previous version of the module which is included
Packit Service 61aa35
primarilly for those wanting to use a custom comparison function rather
Packit Service 61aa35
than a key generating function (and who don't mind the significant
Packit Service 61aa35
performance penalty of perhaps 20-fold).
Packit Service 61aa35
Packit Service 61aa35
diff.pl implements a "diff" in Perl that is as simple as (was
Packit Service 61aa35
previously) possible so that you can see how it works.  The output
Packit Service 61aa35
format is not compatible with regular "diff".  It needs to be
Packit Service 61aa35
reimplemented using the OO interface to greatly simplify the code.
Packit Service 61aa35
Packit Service 61aa35
diffnew.pl implements a "diff" in Perl with full bells and whistles.  By
Packit Service 61aa35
Mark-Jason, with code from cdiff.pl included.
Packit Service 61aa35
Packit Service 61aa35
cdiff.pl implements "diff" that generates real context diffs in either
Packit Service 61aa35
traditional format or GNU unified format.  Original contextless
Packit Service 61aa35
"context" diff supplied by Christian Murphy.  Modifications to make it
Packit Service 61aa35
into a real full-featured diff with -c and -u options supplied by Amir
Packit Service 61aa35
D. Karger.
Packit Service 61aa35
Packit Service 61aa35
Yes, you can use this program to generate patches.
Packit Service 61aa35
Packit Service 61aa35
OTHER RESOURCES
Packit Service 61aa35
Packit Service 61aa35
"Longest Common Subsequences", at
Packit Service 61aa35
http://www.ics.uci.edu/~eppstein/161/960229.html
Packit Service 61aa35
Packit Service 61aa35
This code was adapted from the Smalltalk code of Mario Wolczko
Packit Service 61aa35
<mario@wolczko.com>, which is available at
Packit Service 61aa35
ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st
Packit Service 61aa35
Packit Service 61aa35
THANKS SECTION
Packit Service 61aa35
Packit Service 61aa35
Thanks to Ned Konz's for rewriting the module to greatly improve
Packit Service 61aa35
performance, for maintaining it over the years, and for readilly handing
Packit Service 61aa35
it over to me so I could plod along with my improvements.
Packit Service 61aa35
Packit Service 61aa35
(From Ned Konz's earlier versions):
Packit Service 61aa35
Packit Service 61aa35
Thanks to Mark-Jason Dominus for doing the original Perl version and
Packit Service 61aa35
maintaining it over the last couple of years. Mark-Jason has been a huge
Packit Service 61aa35
contributor to the Perl community and CPAN; it's because of people like
Packit Service 61aa35
him that Perl has become a success.
Packit Service 61aa35
Packit Service 61aa35
Thanks to Mario Wolczko <mario@wolczko.com> for writing and making
Packit Service 61aa35
publicly available his Smalltalk version of diff, which this Perl
Packit Service 61aa35
version is heavily based on.
Packit Service 61aa35
Packit Service 61aa35
Thanks to Mike Schilli <m@perlmeister.com> for writing sdiff and
Packit Service 61aa35
traverse_balanced and making them available for the Algorithm::Diff
Packit Service 61aa35
distribution.
Packit Service 61aa35
Packit Service 61aa35
(From Mark-Jason Dominus' earlier versions):
Packit Service 61aa35
Packit Service 61aa35
Huge thanks to Amir Karger for adding full context diff supprt to
Packit Service 61aa35
"cdiff.pl", and then for waiting patiently for five months while I let
Packit Service 61aa35
it sit in a closet and didn't release it.  Thank you thank you thank
Packit Service 61aa35
you, Amir!
Packit Service 61aa35
Packit Service 61aa35
Thanks to Christian Murphy for adding the first context diff format
Packit Service 61aa35
support to "cdiff.pl".