From d9b22fb1dac3830d3a33797f4beb39b80b48eb7a Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 5 Jun 2002 13:05:19 +0000 Subject: [PATCH] Proposing simplified perlmarcstructure. Interesting mainly for Steve --- marc/perlmarcstructure | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/marc/perlmarcstructure b/marc/perlmarcstructure index 5545850916..3142c54bf6 100644 --- a/marc/perlmarcstructure +++ b/marc/perlmarcstructure @@ -10,24 +10,37 @@ $record->{tags}=$tags $tags is a hash reference -$tags->{1}=$tag -$tags->{2}=$tag -$tags->{3}=$tag +$tags->{$tag} +$tags->{$tag}->{$tagorder} +$tags->{$tag}->{$tagorder}->{indicator}='04' +$tags->{$tag}->{$tagorder}->{tagid}=573498 +$tags->{$tag}->{$tagorder}->{subfields}=$subfields -$tag->{tag}=110 -$tag->{indicator}='04' -$tag->{tagid}=573498 -$tag->{subfields}=$subfields +$subfields is a hash reference +$subfields->{$mark} +$subfields->{$mark}->{$subfieldorder} +$subfields->{$mark}->{$subfieldorder}='MacDonald, John A.' -$subfields->{1}=$subfield -$subfields->{2}=$subfield -$subfields->{3}=$subfield +Sample : +bibid=58973, +110 ## $afirst text $asecond text $bthird text +120 ## $alast text ?? +120 01 $nno, another text -$subfield is a hash reference +in perlmarcstructure, it can be writen : +$record->{bibid}=58973 +$record->{tags}->{110}->{1}->{indicator}='##'; +$record->{tags}->{110}->{1}->->{a}->{1}='first text'; +$record->{tags}->{110}->{1}->{a}->{2}='second text'; +$record->{tags}->{110}->{1}->{b}->{1}='third text'; + +$record->{tags}->{120}->{1}->{indicator}='##'; +$record->{tags}->{120}->{1}->{a}->{1}='last text ??'; + +$record->{tags}->{120}->{2}->{indicator}='01'; +$record->{tags}->{120}->{2}->{n}->{1}='no, another text'; -$subfield->{mark}='a' -$subfield->{value}='MacDonald, John A.' This takes care of possible repeating tags and subfields as well as ordering of tags and subfields, but it makes it difficult to look up specific tags and -- 2.39.2