/[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 888 by dpavlin, Wed May 23 20:03:14 2007 UTC revision 889 by dpavlin, Thu Sep 6 19:12:15 2007 UTC
# Line 535  sub marc_fixed { Line 535  sub marc_fixed {
535          my ($f, $pos, $val) = @_;          my ($f, $pos, $val) = @_;
536          die "need marc(field, position, value)" unless defined($f) && defined($pos);          die "need marc(field, position, value)" unless defined($f) && defined($pos);
537    
538            confess "need val" unless defined $val;
539    
540          my $update = 0;          my $update = 0;
541    
542          map {          map {
543                  if ($_->[0] eq $f) {                  if ($_->[0] eq $f) {
544                          my $old = $_->[1];                          my $old = $_->[1];
545                          if (length($old) < $pos) {                          if (length($old) <= $pos) {
546                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;
547                                  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);
548                          } else {                          } else {

Legend:
Removed from v.888  
changed lines
  Added in v.889

  ViewVC Help
Powered by ViewVC 1.1.26