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 |
|
|
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 ); |
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; |
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 |
|
|