Am Do 21. Jun 2007, 08:42:44, BRIANSKI schrieb:
Show quoted text> Algorithm::Huffman is incompatible with Heap 0.80. Downgrading to Heap
> 0.71 solved the problem for me.
Alternatively patch AH to be compatible with Heap::Elem 0.80
--- Algorithm-Huffman-0.09/Huffman.pm 2002-09-06 13:29:16.000000000 +0200
+++ Algorithm-Huffman-0.09.patch/Huffman.pm 2010-04-27
21:39:11.000000000 +0200
@@ -195,25 +195,25 @@
my $self = $class->SUPER::new;
- $self->{"KeyValuePair::key"} = $key;
- $self->{"KeyValuePair::value"} = $value;
+ $self->[0]{"KeyValuePair::key"} = $key;
+ $self->[0]{"KeyValuePair::value"} = $value;
return $self;
}
sub cmp {
my ($self, $other) = @_;
- $self->{"KeyValuePair::value"} <=> $other->{"KeyValuePair::value"};
+ $self->[0]{"KeyValuePair::value"} <=>
$other->[0]{"KeyValuePair::value"};
}
sub key {
my $self = shift;
- return $self->{"KeyValuePair::key"};
+ return $self->[0]{"KeyValuePair::key"};
}
sub value {
my $self = shift;
- return $self->{"KeyValuePair::value"};
+ return $self->[0]{"KeyValuePair::value"};
}
1;