Algorithm::DiffOld - Online Linux Manual PageSection : 3pm
Updated : 2020-12-17
Source : perl v5.32.0
Note : User Contributed Perl Documentation

NAMEAlgorithm::DiffOld − Compute `intelligent' differences between two files / lists but use the old (<=0.59) interface.

NOTEThis has been provided as part of the Algorithm::Diff package by Ned Konz. This particular module is ONLY for people who HAVE to have the old interface, which uses a comparison function rather than a key generating function. Because each of the lines in one array have to be compared with each of the lines in the other array, this does M*N comparisons. This can be very slow. I clocked it at taking 18 times as long as the stock version of Algorithm::Diff for a 4000−line file. It will get worse quadratically as array sizes increase.

SYNOPSIS​ use Algorithm::DiffOld qw(diff LCS traverse_sequences); ​ ​ @lcs = LCS( \@seq1, \@seq2, $comparison_function ); ​ ​ $lcsref = LCS( \@seq1, \@seq2, $comparison_function ); ​ ​ @diffs = diff( \@seq1, \@seq2, $comparison_function ); ​ ​ traverse_sequences( \@seq1, \@seq2, ​ { MATCH => $callback, ​ DISCARD_A => $callback, ​ DISCARD_B => $callback, ​ }, ​ $comparison_function );

COMPARISON FUNCTIONSEach of the main routines should be passed a comparison function. If you aren't passing one in, use Algorithm::Diff instead. These functions should return a true value when two items should compare as equal. For instance, ​ @lcs = LCS( \@seq1, \@seq2, sub { my ($a, $b) = @_; $a eq $b } ); but if that is all you're doing with your comparison function, just use Algorithm::Diff and let it do this (this is its default). Or: ​ sub someFunkyComparisonFunction ​ { ​ my ($a, $b) = @_; ​ $a =~ m{$b}; ​ } ​ ​ @diffs = diff( \@lines, \@patterns, \&someFunkyComparisonFunction ); which would allow you to diff an array @lines which consists of text lines with an array @patterns which consists of regular expressions. This is actually the reason I wrote this version \*(-- there is no way to do this with a key generation function as in the stock Algorithm::Diff.
0
Johanes Gumabo
Data Size   :   6,920 byte
man-Algorithm::DiffOld.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 175,197
Visitor ID   :     :  
Visitor IP   :   18.119.157.241   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Algorithm::DiffOld.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Algorithm::DiffOld.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Algorithm::DiffOld.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Algorithm::DiffOld.3pm|43|'br══─}─══ |'br══─}─══ )         (rof_escape_sequence|91|Algorithm::DiffOld.3pm|144|\*(-- there is no way |This is actually the reason I wrote this version \*(-- there is no way )