Ezra elias kilty Cooper > html-diff-0.55 > HTML::Diff

Download:
html-diff-0.55.tar.gz

Dependencies

Annotate this POD

Related Modules

HTML::TokeParser
XML::Parser
HTML::Parser
Class::DBI
Data::Dumper
more...
By perlmonks.org

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.55   Source  

HTML::Diff ^

This module compares two strings of HTML and returns a list of a chunks which indicate the diff between the two input strings, where changes in formatting are considered changes.

SYNOPSIS ^

 $result = html_word_diff($left_text, $right_text);

DESCRIPTION ^

   Returns a reference to a list of triples [<flag>, <left>, <right>].
   Concatenating all the <left> members from the return value should
   produce the input $left_text, and likewise for the <right> members.

   The <flag> is either 'u', '+', '-', or 'c', indicating whether the
   two chunks are the same, the $right_text contained this chunk and 
   the left chunk didn't, or vice versa, or the two chunks are simply
   different. This follows the usage of Algorithm::Diff.

   The difference is computed on a word-by-word basis, "breaking" on
   visible words in the HTML text. If a tag only is changed, it will
   not be returned as an independent chunk but will be shown as a
   change to one of the neighboring words. For balanced tags, such as
   <b> </b>, it is intended that a change to the tag will be treated
   as a change to all words in between.

AUTHOR ^

   Whipped up by Ezra elias kilty Cooper, ezra@ezrakilty.net

SEE ALSO ^

   Algorithm::Diff
syntax highlighting: