Algorithm-Diff

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

Changes
lib/Algorithm/Diff.pm       Algorithm::Diff perl module
lib/Algorithm/DiffOld.pm    Algorithm::Diff perl module with old behavior
Makefile.PL
MANIFEST
README
t/base.t                    Basic test script
t/oo.t                      OO interface test script
cdiff.pl                    Context diff utility
diff.pl                     Simple Unix diff utility written in Perl
diffnew.pl                  Full-featured Unix diff utility written in Perl
htmldiff.pl                 Sample using traverse_sequences
META.yml                    Module meta-data (added by MakeMaker)
META.json                                Module JSON meta-data (added by MakeMaker)

README  view on Meta::CPAN

This is a module for computing the difference between two files, two
strings, or any other two lists of things.  It uses an intelligent
algorithm similar to (or identical to) the one used by the Unix "diff"
program.  It is guaranteed to find the *smallest possible* set of
differences.

This package contains a few parts.

Algorithm::Diff is the module that contains several interfaces for which
computing the differences betwen two lists.

The several "diff" programs also included in this package use
Algorithm::Diff to find the differences and then they format the output.

lib/Algorithm/Diff.pm  view on Meta::CPAN

Additional parameters, if any, will be passed to the key generation
routine.

=head2 C<sdiff>

    @sdiffs     = sdiff( \@seq1, \@seq2 );
    $sdiffs_ref = sdiff( \@seq1, \@seq2 );

C<sdiff> computes all necessary components to show two sequences
and their minimized differences side by side, just like the
Unix-utility I<sdiff> does:

    same             same
    before     |     after
    old        <     -
    -          >     new

It returns a list of array refs, each pointing to an array of
display instructions. In scalar context it returns a reference
to such a list. If there are no differences, the list will have one
entry per item, each indicating that the item was unchanged.



( run in 1.294 second using v1.01-cache-2.11-cpan-df04353d9ac )