probably better order this thing.

This commit is contained in:
Matthew Wilson 2006-05-12 15:07:44 +00:00
parent df7886f16f
commit 046796c383

View file

@ -252,14 +252,15 @@ Which column of the result set to use as the key when creating the hashref.
=cut
sub buildHashRefOfHashRefs {
my $hashRef;
my %hash;
my $sth = $_[0]->read($_[1],$_[2]);
my $data;
tie %hash, "Tie::IxHash";
while ($data = $sth->hashRef) {
$hashRef->{$data->{$_[3]}} = $data;
$hash{$data->{$_[3]}} = $data;
}
$sth->finish;
return $hashRef;
return \%hash;
}