Skip Menu |

This queue is for tickets about the Algorithm-Merge CPAN distribution.

Report information
The Basics
Id: 58031
Status: new
Priority: 0/
Queue: Algorithm-Merge

Owner: Nobody in particular
Requestors: bobh528 [...]

Bug Information
Severity: Critical
Broken in: 0.08
Fixed in: (no value)

MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1275435494-10892-53"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 1196
Download (untitled) / with headers
text/plain 1.1k
Attached please find short program trying to use diff3 from Algorithm::Merge with a small dataset. Here is the output I get: Algorithm::Diff version: 1.1902 Algorithm::Merge version: 0.08 @o = ( A C F G H ) @l = ( A C E F G H ) @r = ( A B C D E F G H ) 1 u A A A 2 r undef undef B 3 u C C C 4 u F E D 5 u G F E 6 u H G F 7 u undef undef A 8 r undef undef H Until row 4 things look OK, but row 4 and beyond look wrong. I would have expected result more like: 1 u A A A 2 r undef undef B 3 u C C C 4 r undef undef D 5 l undef E E 6 u F F F 7 u G G G 8 u H H H (note especially row 7 that includes 'A' in the last col rather than 'G'. Can't imagine what's going on with that) perl -v output: This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1004 [287188] provided by ActiveState Built Sep 3 2008 13:16:37 Thoughts? Am I misunderstanding what diff3 is supposed to do?
MIME-Version: 1.0
Content-Type: application/octet-stream; name=""
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename=""
Content-Transfer-Encoding: base64
Content-Length: 796
text/x-perl 796b
use strict; use Algorithm::Diff; use Algorithm::Merge qw( diff3 ); print "Algorithm::Diff version: $Algorithm::Diff::VERSION\n"; print "Algorithm::Merge version: $Algorithm::Merge::VERSION\n"; my (@o, @l, @r); # initialize original, left, and right arrays: @o = qw( A C F G H); @l = qw( A C E F G H); @r = qw( A B C D E F G H); # For reference, print contents of original, left, and right arrays: print "\@o = ( ", join(' ', @o), " )\n"; print "\@l = ( ", join(' ', @l), " )\n"; print "\@r = ( ", join(' ', @r), " )\n"; # Execute diff3 my @diff = diff3(\@o, \@l, \@r); # Print results my $i; foreach my $d (@diff) { print ++$i, " $d->[0] "; map {printf "%-8s", defined($d->[$_]) ? $d->[$_] : "undef"} (1..3); print "\n"; } exit;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to