35 |
|
|
36 |
=head1 VERSION |
=head1 VERSION |
37 |
|
|
38 |
Version 0.14 |
Version 0.15 |
39 |
|
|
40 |
=cut |
=cut |
41 |
|
|
42 |
our $VERSION = '0.14'; |
our $VERSION = '0.15'; |
43 |
|
|
44 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
45 |
|
|
525 |
'c', rec('200','c') |
'c', rec('200','c') |
526 |
); |
); |
527 |
|
|
528 |
|
If you specify C<+> for subfield, value will be appended |
529 |
|
to previous defined subfield. |
530 |
|
|
531 |
=cut |
=cut |
532 |
|
|
533 |
sub marc_compose { |
sub marc_compose { |
545 |
|
|
546 |
next unless (defined($v) && $v !~ /^\s*$/); |
next unless (defined($v) && $v !~ /^\s*$/); |
547 |
from_to($v, 'iso-8859-2', $marc_encoding) if ($marc_encoding); |
from_to($v, 'iso-8859-2', $marc_encoding) if ($marc_encoding); |
|
push @$m, ( $sf, $v ); |
|
548 |
warn "## ++ marc_compose($f,$sf,$v) ", dump( $m ),$/ if ($debug > 1); |
warn "## ++ marc_compose($f,$sf,$v) ", dump( $m ),$/ if ($debug > 1); |
549 |
|
if ($sf ne '+') { |
550 |
|
push @$m, ( $sf, $v ); |
551 |
|
} else { |
552 |
|
$m->[ $#$m ] .= $v; |
553 |
|
} |
554 |
} |
} |
555 |
|
|
556 |
warn "## marc_compose current marc = ", dump( $m ),$/ if ($debug > 1); |
warn "## marc_compose current marc = ", dump( $m ),$/ if ($debug > 1); |