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
-Algorithm::C3 version 0.02
+Algorithm::C3 version 0.03
===========================
See the individual module documentation for more information
use Carp 'confess';
-our $VERSION = '0.02';
+our $VERSION = '0.03';
sub merge {
my ($root, $parent_fetcher) = @_;
# 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;
$tails{$_}++ for (@$seq[1..$#$seq]);
}
- my @res;
+ my @res = ( $current_root );
while (1) {
my $cand;
my $winner;