/[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 373 by dpavlin, Sun Jan 8 22:09:33 2006 UTC revision 397 by dpavlin, Wed Feb 15 15:54:12 2006 UTC
# Line 471  sub fill_in { Line 471  sub fill_in {
471          # remove filter{...} from beginning          # remove filter{...} from beginning
472          $filter_name = $1 if ($format =~ s/^filter{([^}]+)}//s);          $filter_name = $1 if ($format =~ s/^filter{([^}]+)}//s);
473    
474          # do actual replacement of placeholders          {
475          # repeatable fields                  # fix warnings
476          if ($format =~ s/v(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,$i,\$found,$rec_size)/ges) {                  no warnings 'uninitialized';
477                  $just_single = 0;  
478          }                  # do actual replacement of placeholders
479                    # repeatable fields
480                    if ($format =~ s/v(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,$i,\$found,$rec_size)/ges) {
481                            $just_single = 0;
482                    }
483    
484          # non-repeatable fields                  # non-repeatable fields
485          if ($format =~ s/s(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,0,\$found,$rec_size)/ges) {                  if ($format =~ s/s(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,0,\$found,$rec_size)/ges) {
486                  return if ($i > 0 && $just_single);                          return if ($i > 0 && $just_single);
487                    }
488          }          }
489    
490          if ($found) {          if ($found) {
# Line 551  sub _rec_to_arr { Line 556  sub _rec_to_arr {
556                  if (@v) {                  if (@v) {
557                          push @arr, @v;                          push @arr, @v;
558                  } else {                  } else {
559                          push @arr, '';                          push @arr, '' if ($max > $i);
560                  }                  }
561          }          }
562    

Legend:
Removed from v.373  
changed lines
  Added in v.397

  ViewVC Help
Powered by ViewVC 1.1.26