From: Dobrica Pavlinusic Date: Thu, 23 Sep 2010 12:24:38 +0000 (+0000) Subject: rename tag number to $tag X-Git-Url: http://git.rot13.org/?p=MARC-Fast;a=commitdiff_plain;h=0dbe189e6984e2dd51cc903ffbbfa98094dd9f65;ds=sidebyside rename tag number to $tag git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/MARC-Fast/trunk@36 49f9634a-d7ec-0310-8e6b-ec35c6cc8804 --- diff --git a/Fast.pm b/Fast.pm index d8b23bc..aef3d5b 100644 --- a/Fast.pm +++ b/Fast.pm @@ -311,14 +311,14 @@ sub to_hash { my $row = $self->fetch($mfn) || return; - foreach my $rec_nr (keys %{$row}) { - foreach my $l (@{$row->{$rec_nr}}) { + foreach my $tag (keys %{$row}) { + foreach my $l (@{$row->{$tag}}) { # remove end marker $l =~ s/\x1E$//; # filter output - $l = $self->{'hash_filter'}->($l, $rec_nr) if ($self->{'hash_filter'}); + $l = $self->{'hash_filter'}->($l, $tag) if ($self->{'hash_filter'}); my $val; @@ -351,7 +351,7 @@ sub to_hash { $val = $l; } - push @{$rec->{$rec_nr}}, $val; + push @{$rec->{$tag}}, $val; } }