--- trunk/lib/WebPAC/Normalize.pm 2006/07/01 08:55:34 553 +++ trunk/lib/WebPAC/Normalize.pm 2006/07/01 10:19:29 554 @@ -3,6 +3,7 @@ @EXPORT = qw/ _set_rec _set_lookup _get_ds _clean_ds + _debug tag search display marc marc_indicators marc_repeatable_subfield @@ -29,11 +30,11 @@ =head1 VERSION -Version 0.06 +Version 0.07 =cut -our $VERSION = '0.06'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -153,16 +154,32 @@ $marc->add_fields( WebPAC::Normalize:_get_marc_fields() ); - - We are using I which detect repeatable fields only from sequence of field/subfield data generated by normalization. -Repeatable field is created if there is second occurence of same subfield or -if any of indicators are different. This is sane for most cases except for -non-repeatable fields with repeatable subfields. +Repeatable field is created when there is second occurence of same subfield or +if any of indicators are different. + +This is sane for most cases. Something like: + + 900a-1 900b-1 900c-1 + 900a-2 900b-2 + 900a-3 + +will be created from any combination of: + + 900a-1 900a-2 900a-3 900b-1 900b-2 900c-1 + +and following rules: + + marc('900','a', rec('200','a') ); + marc('900','b', rec('200','b') ); + marc('900','c', rec('200','c') ); -You can change behaviour of that using C. +which might not be what you have in mind. If you need repeatable subfield, +define it using C like this: + +.... =cut @@ -266,6 +283,20 @@ return @m; } +=head2 _debug + +Change level of debug warnings + + _debug( 2 ); + +=cut + +sub _debug { + my $l = shift; + return $debug unless defined($l); + $debug = $l; +} + =head1 Functions to create C Those functions generally have to first in your normalization file.