From: Dobrica Pavlinusic Date: Sat, 8 Oct 2005 16:33:09 +0000 (+0000) Subject: convert repeatable fileds into repeatable subfields X-Git-Url: http://git.rot13.org/?p=MARC-Fast;a=commitdiff_plain;h=96b41f990776b11c9bb1824d34cb93c368985053 convert repeatable fileds into repeatable subfields git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/MARC-Fast/trunk@5 49f9634a-d7ec-0310-8e6b-ec35c6cc8804 --- diff --git a/Changes b/Changes index e4867d8..be97c42 100644 --- a/Changes +++ b/Changes @@ -3,4 +3,7 @@ Revision history for Perl module MARC::Fast 0.01 Sun Jan 2 03:42:23 2005 - original version; created by ExtUtils::ModuleMaker 0.32 +0.02 Sat Oct 8 17:57:37 CEST 2005 + - convert repeatable fileds into repeatable subfields + 900^afoo and 900^abar -> 900^afoo^abar diff --git a/Fast.pm b/Fast.pm index 50e43cc..9a981be 100644 --- a/Fast.pm +++ b/Fast.pm @@ -7,7 +7,7 @@ use Data::Dumper; BEGIN { use Exporter (); use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); - $VERSION = 0.01; + $VERSION = 0.02; @ISA = qw (Exporter); #Give a hoot don't pollute, do not export more than needed by default @EXPORT = qw (); @@ -196,7 +196,11 @@ sub fetch { my $f = substr($fields,$addr,$len); print STDERR "tag/len/addr $tag [$len] $addr: '$f'\n" if ($self->{debug}); - $row->{$tag} = $f; + if ($row->{$tag}) { + $row->{$tag} .= $f; + } else { + $row->{$tag} = $f; + } my $del = substr($fields,$addr+$len-1,1);