Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    HTML::Diff 0.561

    Download button

    No screenshots available
    Downloads: 331  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ezra | More programs
    Perl Artistic License / FREE
    September 14th, 2007, 10:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    HTML::Diff description

    A Perl module compares two strings of HTML and returns a list of a chunks

    HTML::Diff Perl 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.

    HTML::Diff does not strictly parse the HTML. Instead, it uses regular expressions to make a decent effort at understanding the given HTML. As a result, there are many valid HTML documents for which it will not produce the correct answer. But there may be some invalid HTML documents for which it gives you the answer you're looking for. Your mileage may vary; test it on lots of inputs from your domain before relying on it.

    SYNOPSIS

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

    Returns a reference to a list of triples [< flag >, < left >, < right >]. Each triple represents a check of the input texts. The flag tells you whether it represents a deletion, insertion, a modification, or an unchanged chunk.

    Every character of each input text is accounted for by some triple in the output. Specifically, Concatenating all the < left > members from the return value should produce $left_text, and likewise the < right > members concatenate together to produce $right_text.

    The 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.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    compare strings | HTML diff | Perl module | HTML | diff | strings

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM