From: Brandon L Black Date: Wed, 9 Aug 2006 16:48:12 +0000 (+0000) Subject: final changes for 0.03 dist X-Git-Tag: 0.03^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7946639b1211466c23c7c3255b5e9e1d8952df78;p=gitmo%2FAlgorithm-C3.git final changes for 0.03 dist --- diff --git a/Changes b/Changes index 32677b7..5fb9fbb 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Algorithm-C3. +0.03 Tue. Aug. 08, 2006 + - New test + bugfix for RT#20879 + 0.02 Sun. Jul. 30, 2006 - code refactored for speed by Brandon L. Black diff --git a/MANIFEST b/MANIFEST index 8719f2e..6fd8e77 100644 --- a/MANIFEST +++ b/MANIFEST @@ -11,5 +11,6 @@ t/002_merge.t t/003_merge.t t/004_merge.t t/005_order_disagreement.t +t/006_complex_merge.t t/pod.t t/pod_coverage.t diff --git a/README b/README index d9e3503..0fa512e 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Algorithm::C3 version 0.02 +Algorithm::C3 version 0.03 =========================== See the individual module documentation for more information diff --git a/lib/Algorithm/C3.pm b/lib/Algorithm/C3.pm index a18828a..1f0bd87 100644 --- a/lib/Algorithm/C3.pm +++ b/lib/Algorithm/C3.pm @@ -6,7 +6,7 @@ use warnings; use Carp 'confess'; -our $VERSION = '0.02'; +our $VERSION = '0.03'; sub merge { my ($root, $parent_fetcher) = @_; @@ -54,10 +54,8 @@ sub merge { # that was a perl-port of the python code at # http://www.python.org/2.3/mro.html :) - # Initial set - my @deepcopy_recurse_mergeout; - push(@deepcopy_recurse_mergeout, [@$_]) for (@$recurse_mergeout); - my @seqs = ([$current_root], @deepcopy_recurse_mergeout, [@$current_parents]); + # Initial set (make sure everything is copied - it will be modded) + my @seqs = map { [@$_] } (@$recurse_mergeout, $current_parents); # Construct the tail-checking hash my %tails; @@ -65,7 +63,7 @@ sub merge { $tails{$_}++ for (@$seq[1..$#$seq]); } - my @res; + my @res = ( $current_root ); while (1) { my $cand; my $winner;