/[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 547 by dpavlin, Thu Jun 29 23:19:26 2006 UTC revision 548 by dpavlin, Thu Jun 29 23:29:02 2006 UTC
# Line 176  sub _get_marc_fields { Line 176  sub _get_marc_fields {
176                          )                          )
177                  ) {                  ) {
178                          push @$last, ( $row->[3] , $row->[4] );                          push @$last, ( $row->[3] , $row->[4] );
                         warn "## ++ added $row->[0] ^$row->[3] to $last->[0]\n";  
179                          next;                          next;
180                  } elsif ($last) {                  } elsif ($last) {
181                          push @m, $last;                          push @m, $last;
# Line 262  sub marc { Line 261  sub marc {
261                  my $v = $_;             # make var read-write for Encode                  my $v = $_;             # make var read-write for Encode
262                  next unless (defined($v) && $v !~ /^\s*$/);                  next unless (defined($v) && $v !~ /^\s*$/);
263                  from_to($v, 'iso-8859-2', $marc_encoding) if ($marc_encoding);                  from_to($v, 'iso-8859-2', $marc_encoding) if ($marc_encoding);
264                  push @{ $marc_record }, [                  my ($i1,$i2) = defined($marc_indicators->{$f}) ? @{ $marc_indicators->{$f} } : (' ',' ');
265                          $f,                  push @{ $marc_record }, [ $f, $i1, $i2, $sf => $v ];
                         $marc_indicators->{$f}->{i1} || ' ',  
                         $marc_indicators->{$f}->{i2} || ' ',  
                         $sf => $v  
                 ];  
266          }          }
267  }  }
268    
# Line 303  sub marc_indicators { Line 298  sub marc_indicators {
298    
299          $i1 = ' ' if ($i1 !~ /^\d$/);          $i1 = ' ' if ($i1 !~ /^\d$/);
300          $i2 = ' ' if ($i2 !~ /^\d$/);          $i2 = ' ' if ($i2 !~ /^\d$/);
301          $marc_indicators->{$f}->{i1} = $i1;          @{ $marc_indicators->{$f} } = ($i1,$i2);
         $marc_indicators->{$f}->{i2} = $i2;  
302  }  }
303    
304    

Legend:
Removed from v.547  
changed lines
  Added in v.548

  ViewVC Help
Powered by ViewVC 1.1.26