Skip to content

Commit

Permalink
Initial attempt to add a workable proto for _longestCommonSubsequence…
Browse files Browse the repository at this point in the history
…. Not quite finished. Fixed bug in sub traverse_sequences due to change on how to create an empty anonymous sub.
  • Loading branch information
Takadonet committed Mar 8, 2013
1 parent 7a8b13b commit 343d7bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Algorithm/Diff.pm
Expand Up @@ -109,6 +109,7 @@ our sub _replaceNextLargerWith( @array is rw, $aValue, $high is copy )

# If passed two arrays, trim any leading or trailing common elements, then
# process (&prepare) the second array to a hash and redispatch
our proto sub _longestCommonSubsequence(@a,@b?,%bMatches?,$counting?,&fcn?,%args?) {*}

our multi sub _longestCommonSubsequence(
@a,
Expand Down Expand Up @@ -274,7 +275,7 @@ sub traverse_sequences(
if ( &finished_a.defined )
{
&finished_a( $lastA );
&finished_a = {};
&finished_a = sub {};
}
else
{
Expand All @@ -288,7 +289,7 @@ sub traverse_sequences(
if ( &finished_b.defined )
{
&finished_b( $lastB );
&finished_b = {};
&finished_b = sub {};
}
else
{
Expand Down

0 comments on commit 343d7bb

Please sign in to comment.