X-Git-Url: http://git.rot13.org/?p=MARC-Fast;a=blobdiff_plain;f=Fast.pm;h=aef3d5b5baead4b41eb5ec183f6196696f87c52f;hp=6485b55397d4190d5b115285d1e4662c1984ada2;hb=cabfd93a9ff6f82e8b67e3050ca3c2ea1ef0af37;hpb=c9df7a8379b2016ab44b0427198a193c4a98cf2e diff --git a/Fast.pm b/Fast.pm index 6485b55..aef3d5b 100644 --- a/Fast.pm +++ b/Fast.pm @@ -7,7 +7,7 @@ use Data::Dump qw/dump/; BEGIN { use Exporter (); use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); - $VERSION = 0.09; + $VERSION = 0.10; @ISA = qw (Exporter); #Give a hoot don't pollute, do not export more than needed by default @EXPORT = qw (); @@ -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; } }