3 |
@EXPORT = qw/ |
@EXPORT = qw/ |
4 |
_set_rec _set_lookup |
_set_rec _set_lookup |
5 |
_get_ds _clean_ds |
_get_ds _clean_ds |
6 |
|
_debug |
7 |
|
|
8 |
tag search display |
tag search display |
9 |
marc marc_indicators marc_repeatable_subfield |
marc marc_indicators marc_repeatable_subfield |
30 |
|
|
31 |
=head1 VERSION |
=head1 VERSION |
32 |
|
|
33 |
Version 0.06 |
Version 0.07 |
34 |
|
|
35 |
=cut |
=cut |
36 |
|
|
37 |
our $VERSION = '0.06'; |
our $VERSION = '0.07'; |
38 |
|
|
39 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
40 |
|
|
154 |
|
|
155 |
$marc->add_fields( WebPAC::Normalize:_get_marc_fields() ); |
$marc->add_fields( WebPAC::Normalize:_get_marc_fields() ); |
156 |
|
|
|
|
|
|
|
|
157 |
We are using I<magic> which detect repeatable fields only from |
We are using I<magic> which detect repeatable fields only from |
158 |
sequence of field/subfield data generated by normalization. |
sequence of field/subfield data generated by normalization. |
159 |
|
|
160 |
Repeatable field is created if there is second occurence of same subfield or |
Repeatable field is created when there is second occurence of same subfield or |
161 |
if any of indicators are different. This is sane for most cases except for |
if any of indicators are different. |
162 |
non-repeatable fields with repeatable subfields. |
|
163 |
|
This is sane for most cases. Something like: |
164 |
|
|
165 |
|
900a-1 900b-1 900c-1 |
166 |
|
900a-2 900b-2 |
167 |
|
900a-3 |
168 |
|
|
169 |
|
will be created from any combination of: |
170 |
|
|
171 |
|
900a-1 900a-2 900a-3 900b-1 900b-2 900c-1 |
172 |
|
|
173 |
|
and following rules: |
174 |
|
|
175 |
|
marc('900','a', rec('200','a') ); |
176 |
|
marc('900','b', rec('200','b') ); |
177 |
|
marc('900','c', rec('200','c') ); |
178 |
|
|
179 |
You can change behaviour of that using C<marc_repeatable_subfield>. |
which might not be what you have in mind. If you need repeatable subfield, |
180 |
|
define it using C<marc_repeatable_subfield> like this: |
181 |
|
|
182 |
|
.... |
183 |
|
|
184 |
=cut |
=cut |
185 |
|
|
283 |
return @m; |
return @m; |
284 |
} |
} |
285 |
|
|
286 |
|
=head2 _debug |
287 |
|
|
288 |
|
Change level of debug warnings |
289 |
|
|
290 |
|
_debug( 2 ); |
291 |
|
|
292 |
|
=cut |
293 |
|
|
294 |
|
sub _debug { |
295 |
|
my $l = shift; |
296 |
|
return $debug unless defined($l); |
297 |
|
$debug = $l; |
298 |
|
} |
299 |
|
|
300 |
=head1 Functions to create C<data_structure> |
=head1 Functions to create C<data_structure> |
301 |
|
|
302 |
Those functions generally have to first in your normalization file. |
Those functions generally have to first in your normalization file. |