[Koha-cvs] CVS: koha/marc perlmarcstructure,1.2,1.3

Paul POULAIN tipaul at users.sourceforge.net
Wed Jun 5 15:05:21 CEST 2002


Update of /cvsroot/koha/koha/marc
In directory usw-pr-cvs1:/tmp/cvs-serv28452/marc

Modified Files:
	perlmarcstructure 
Log Message:
Proposing simplified perlmarcstructure. Interesting mainly for Steve


Index: perlmarcstructure
===================================================================
RCS file: /cvsroot/koha/koha/marc/perlmarcstructure,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** perlmarcstructure	29 May 2002 22:11:20 -0000	1.2
--- perlmarcstructure	5 Jun 2002 13:05:19 -0000	1.3
***************
*** 11,32 ****
  $tags is a hash reference
  
! $tags->{1}=$tag
! $tags->{2}=$tag
! $tags->{3}=$tag
  
! $tag->{tag}=110
! $tag->{indicator}='04'
! $tag->{tagid}=573498
! $tag->{subfields}=$subfields
  
  
! $subfields->{1}=$subfield
! $subfields->{2}=$subfield
! $subfields->{3}=$subfield
  
! $subfield is a hash reference
  
- $subfield->{mark}='a'
- $subfield->{value}='MacDonald, John A.'
  
  This takes care of possible repeating tags and subfields as well as ordering of
--- 11,45 ----
  $tags is a hash reference
  
! $tags->{$tag}
! $tags->{$tag}->{$tagorder}
! $tags->{$tag}->{$tagorder}->{indicator}='04'
! $tags->{$tag}->{$tagorder}->{tagid}=573498
! $tags->{$tag}->{$tagorder}->{subfields}=$subfields
  
! $subfields is a hash reference
  
+ $subfields->{$mark}
+ $subfields->{$mark}->{$subfieldorder}
+ $subfields->{$mark}->{$subfieldorder}='MacDonald, John A.'
  
! Sample :
! bibid=58973,
! 110 ## $afirst text $asecond text $bthird text
! 120 ## $alast text ??
! 120 01 $nno, another text
  
! 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';
  
  
  This takes care of possible repeating tags and subfields as well as ordering of





More information about the Koha-cvs mailing list