164 |
|
|
165 |
=cut |
=cut |
166 |
|
|
167 |
my ($out, $marc_record, $marc_encoding, $marc_repeatable_subfield, $marc_indicators); |
my ($out, $marc_record, $marc_encoding, $marc_repeatable_subfield, $marc_indicators, $leader); |
168 |
my ($marc_record_offset, $marc_fetch_offset) = (0, 0); |
my ($marc_record_offset, $marc_fetch_offset) = (0, 0); |
169 |
|
|
170 |
sub _get_ds { |
sub _get_ds { |
181 |
|
|
182 |
sub _clean_ds { |
sub _clean_ds { |
183 |
my $a = {@_}; |
my $a = {@_}; |
184 |
($out,$marc_record, $marc_encoding, $marc_repeatable_subfield, $marc_indicators) = (); |
($out,$marc_record, $marc_encoding, $marc_repeatable_subfield, $marc_indicators, $leader) = (); |
185 |
($marc_record_offset, $marc_fetch_offset) = (0,0); |
($marc_record_offset, $marc_fetch_offset) = (0,0); |
186 |
$marc_encoding = $a->{marc_encoding}; |
$marc_encoding = $a->{marc_encoding}; |
187 |
} |
} |
487 |
my ($offset,$value) = @_; |
my ($offset,$value) = @_; |
488 |
|
|
489 |
if ($offset) { |
if ($offset) { |
490 |
$out->{' leader'}->{ $offset } = $value; |
$leader->{ $offset } = $value; |
491 |
} else { |
} else { |
492 |
return $out->{' leader'}; |
return $leader; |
493 |
} |
} |
494 |
} |
} |
495 |
|
|
1067 |
|
|
1068 |
warn "## lookup returns = ", dump(@out), $/; |
warn "## lookup returns = ", dump(@out), $/; |
1069 |
|
|
1070 |
return @out; |
if ($#out == 0) { |
1071 |
|
return $out[0]; |
1072 |
|
} else { |
1073 |
|
return @out; |
1074 |
|
} |
1075 |
} |
} |
1076 |
|
|
1077 |
=head2 save_into_lookup |
=head2 save_into_lookup |