/[webpac2]/trunk/lib/WebPAC/Normalize.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Normalize.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 571 by dpavlin, Mon Jul 3 14:30:22 2006 UTC revision 572 by dpavlin, Mon Jul 3 14:32:40 2006 UTC
# Line 193  sub _get_marc_fields { Line 193  sub _get_marc_fields {
193          # first, sort all existing fields          # first, sort all existing fields
194          # XXX might not be needed, but modern perl might randomize elements in hash          # XXX might not be needed, but modern perl might randomize elements in hash
195          my @sorted_marc_record = sort {          my @sorted_marc_record = sort {
196                  $a->[0] . $a->[3] cmp $b->[0] . $b->[3]                  $a->[0] . ( $a->[3] || '' ) cmp $b->[0] . ( $b->[3] || '')
197          } @{ $marc_record };          } @{ $marc_record };
198    
199          @sorted_marc_record = @{ $marc_record };        ### FIXME disable sorting          @sorted_marc_record = @{ $marc_record };        ### FIXME disable sorting
# Line 203  sub _get_marc_fields { Line 203  sub _get_marc_fields {
203    
204          # count unique field-subfields (used for offset when walking to next subfield)          # count unique field-subfields (used for offset when walking to next subfield)
205          my $u;          my $u;
206          map { $u->{ $_->[0] . $_->[3]  }++ } @sorted_marc_record;          map { $u->{ $_->[0] . ( $_->[3] || '')  }++ } @sorted_marc_record;
207    
208          if ($debug) {          if ($debug) {
209                  warn "## marc_repeatable_subfield ", dump( $marc_repeatable_subfield ), $/;                  warn "## marc_repeatable_subfield ", dump( $marc_repeatable_subfield ), $/;
# Line 231  sub _get_marc_fields { Line 231  sub _get_marc_fields {
231    
232                  # field and subfield which is key for                  # field and subfield which is key for
233                  # marc_repeatable_subfield and u                  # marc_repeatable_subfield and u
234                  my $fsf = $row->[0] . $row->[3];                  my $fsf = $row->[0] . ( $row->[3] || '' );
235    
236                  if ($debug > 1) {                  if ($debug > 1) {
237    

Legend:
Removed from v.571  
changed lines
  Added in v.572

  ViewVC Help
Powered by ViewVC 1.1.26