Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 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

    Text::Diff3::DiffHeckel 0.10

    Download button

    No screenshots available
    Downloads: 333  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    MIZUTANI Tociyuki | More programs
    Perl Artistic License / FREE
    February 17th, 2011, 08:22 GMT [view history]
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::Diff3::DiffHeckel description

    A two-way diff plug-in.

    Text::Diff3::DiffHeckel is a two-way diff plug-in.

    SYNOPSIS

    use Text::Diff3;
    my $f = Text::Diff3::Factory->new;
    my $p = $f->create_diff;
    my $mytext = $f->create_text([ map{chomp;$_} < F0 > ]);
    my $original = $f->create_text([ map{chomp;$_} < F1 > ]);
    my $diff2 = $p->diff( $origial, $mytext );
    $diff2->each(sub{
    my( $r ) = @_;
    print $r->as_string, "n";
    if ( $r->type ne 'd' ) {
    print '-', $original->as_string_at( $_ ) for $r->rangeB;
    }
    if ( $r->type ne 'a' ) {
    print '+', $mytext->as_string_at( $_ ) for $r->rangeA;
    }
    });


    ABSTRACT

    This is a package for Text::Diff3 to compute difference sets between two text buffers based on the P. Heckel's algorithm. Anyone may change this to an another diff or a its wrapper module by a your custom Factory instance.

    Text::Diff3 needs a support of computing difference sets between two text buffers (diff). As the diff(1) command, the required diff module creates a list of tipples recorded an information set of a change type (such as a, c, or d) and a range of line numbers between two text buffers.

    Since there are several algorithms and their implementations for the diff computation, Text::Diff3 makes a plan independent on any specific diff routine. It calls a pluggable diff processor instance specified in a factory commonly used in Text::Diff3. Anyone may change diff plug-in according to text properties.

    For users convenience, Text::Diff3 includes small diff based on the P. Heckel's algorithm. On the other hands, many other systems use the popular Least Common Sequence (LCS) algorithm. The merits for each algorithm are case by case. In author's experience, two algorithms generate almost same results for small local changes in the text. In some cases, such as moving blocks of lines, it happened quite differences in results.Text::Diff3::DiffHeckel is a two-way diff plug-in.


    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · warn a `deprecated' message on import with ':factory' switch.
    · FIX invalid range checking at diff3 conflict cases.

      


    TAGS:

    diff plug-in | two-way plugin | Perl module | Tex | diff | plug-in

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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