Text::Diff

Text::Diff can perform diffs on files and record sets.
Download

Text::Diff Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Barrie Slaymaker
  • Publisher web site:
  • http://search.cpan.org/~rbs/

Text::Diff Tags


Text::Diff Description

Text::Diff can perform diffs on files and record sets. Text::Diff can perform diffs on files and record sets.SYNOPSIS use Text::Diff; ## Mix and match filenames, strings, file handles, producer subs, ## or arrays of records; returns diff in a string. ## WARNING: can return B diffs for large files. my $diff = diff "file1.txt", "file2.txt", { STYLE => "Context" }; my $diff = diff $string1, $string2, %options; my $diff = diff *FH1, *FH2; my $diff = diff &reader1, &reader2; my $diff = diff @records1, @records2; ## May also mix input types: my $diff = diff @records1, "file_B.txt";diff() provides a basic set of services akin to the GNU diff utility. It is not anywhere near as feature complete as GNU diff, but it is better integrated with Perl and available on all platforms. It is often faster than shelling out to a system's diff executable for small files, and generally slower on larger files.Relies on Algorithm::Diff for, well, the algorithm. This may not produce the same exact diff as a system's local diff executable, but it will be a valid diff and comprehensible by patch. We haven't seen any differences between Algorithm::Diff's logic and GNU diff's, but we have not examined them to make sure they are indeed identical.Note: If you don't want to import the diff function, do one of the following: use Text::Diff (); require Text::Diff;That's a pretty rare occurence, so diff() is exported by default.Requirements:· Perl


Text::Diff Related Software