/[webpac2]/trunk/lib/WebPAC/Normalize/MARC.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/MARC.pm

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

revision 1111 by dpavlin, Sat Sep 6 10:54:25 2008 UTC revision 1362 by dpavlin, Mon Apr 11 17:29:18 2011 UTC
# Line 311  sub marc_fixed { Line 311  sub marc_fixed {
311                          if (length($old) <= $pos) {                          if (length($old) <= $pos) {
312                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;
313                                  warn "## marc_fixed($f,$pos,'$val') append '$old' -> '$_->[1]'\n" if ($debug > 1);                                  warn "## marc_fixed($f,$pos,'$val') append '$old' -> '$_->[1]'\n" if ($debug > 1);
314                          } else {                          } elsif ( defined $old ) {
315                                  $_->[1] = substr($old, 0, $pos) . $val . substr($old, $pos + length($val));                                  $_->[1] = substr($old, 0, $pos) . $val . substr($old, $pos + length($val));
316                                  warn "## marc_fixed($f,$pos,'$val') update '$old' -> '$_->[1]'\n" if ($debug > 1);                                  warn "## marc_fixed($f,$pos,'$val') update '$old' -> '$_->[1]'\n" if ($debug > 1);
317                          }                          }
# Line 346  sub marc { Line 346  sub marc {
346    
347          foreach (@_) {          foreach (@_) {
348                  my $v = $_;             # make var read-write for Encode                  my $v = $_;             # make var read-write for Encode
349                    #Encode::_utf8_on($v); # FIXME we probably need this
350                  next unless (defined($v) && $v !~ /^\s*$/);                  next unless (defined($v) && $v !~ /^\s*$/);
351                  my ($i1,$i2) = _get_marc_indicators( $f );                  my ($i1,$i2) = _get_marc_indicators( $f );
352                  if (defined $sf) {                  if (defined $sf) {

Legend:
Removed from v.1111  
changed lines
  Added in v.1362

  ViewVC Help
Powered by ViewVC 1.1.26