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

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

revision 662 by dpavlin, Fri Sep 8 17:48:43 2006 UTC revision 753 by dpavlin, Sun Oct 8 18:43:58 2006 UTC
# Line 16  WebPAC::Output::MARC - Create MARC recor Line 16  WebPAC::Output::MARC - Create MARC recor
16    
17  =head1 VERSION  =head1 VERSION
18    
19  Version 0.03  Version 0.04
20    
21  =cut  =cut
22    
23  our $VERSION = '0.03';  our $VERSION = '0.04';
24    
25  =head1 SYNOPSIS  =head1 SYNOPSIS
26    
# Line 114  sub add { Line 114  sub add {
114                  }                  }
115          }          }
116    
117            # sort fields
118            @$fields = sort { $a->[0] <=> $b->[0] } @$fields;
119    
120          $log->debug("recode fields = ", sub { dump( $fields ) });          $log->debug("recode fields = ", sub { dump( $fields ) });
121    
122          $marc->add_fields( @$fields );          $marc->add_fields( @$fields );
# Line 137  sub add { Line 140  sub add {
140                  if (@w) {                  if (@w) {
141                          $log->error("MARC lint detected warning on record $id\n",                          $log->error("MARC lint detected warning on record $id\n",
142                                  "<<<<< Original input row:\n",dump($arg->{row}), "\n",                                  "<<<<< Original input row:\n",dump($arg->{row}), "\n",
143                                  ">>>>> Normalized MARC row: leader: [", $marc->leader(), "]\n", dump( $arg->{fields} ), "\n",                                  ">>>>> Normalized MARC row: leader: [", $marc->leader(), "]\n", dump( $fields ), "\n",
144                                  "!!!!! MARC lint warnings:\n",join("\n",@w),"\n"                                  "!!!!! MARC lint warnings:\n",join("\n",@w),"\n"
145                          );                          );
146                          map { $self->{_marc_lint_warnings}->{$_}++ } @w;                          map { $self->{_marc_lint_warnings}->{$_}++ } @w;
# Line 147  sub add { Line 150  sub add {
150          if ($self->{dump}) {          if ($self->{dump}) {
151                  $log->info("MARC record on record $id\n",                  $log->info("MARC record on record $id\n",
152                          "<<<<< Original imput row:\n",dump($arg->{row}), "\n",                          "<<<<< Original imput row:\n",dump($arg->{row}), "\n",
153                          ">>>>> Normalized MARC row: leader: [", $marc->leader(), "]\n", dump( $arg->{fields} ), "\n",                          ">>>>> Normalized MARC row: leader: [", $marc->leader(), "]\n", dump( $fields ), "\n",
154                  );                  );
155          }          }
156    

Legend:
Removed from v.662  
changed lines
  Added in v.753

  ViewVC Help
Powered by ViewVC 1.1.26