+ csv/excel output conf/normalize/csv_ff-peri.pl [2.34]
+ fix input/excel encoding problems
+ use UTF-8 as internal encoding
+- marc_clone to copy records/fields/indicators from input marc
- rewrite WebPAC::Input to be based on Module::Pluggable
- check usage of config in normalize file (database, input name?)
- load_ds/save_ds should use on-disk hash to preserve inodes
marc_duplicate marc_remove marc_count
marc_original_order
marc_template
+ marc_clone
/;
use strict;
return $#{ $marc_record };
}
+=head2 marc_clone
+
+Clone marc records from input file, whole or just some fields/indicators
+
+ marc_clone; # whole record
+
+=cut
+
+sub marc_clone {
+ foreach my $f ( keys %$rec ) {
+ warn "## clone $f";
+ marc_original_order( $f, $f );
+ }
+}
+
=head1 PRIVATE FUNCTIONS
=head2 _marc_push
}
}
+
+sub test_marc_clone {
+ my $rec = shift;
+
+ ok( _clean_ds(), '_clean_ds' );
+ ok( _set_ds( $rec ), '_set_ds' );
+
+ ok( marc_clone, 'marc_clone' );
+
+ ok(my $marc = WebPAC::Normalize::MARC::_get_marc_fields(), "_get_marc_fields");
+ diag "rec = ",dump( $rec );
+ diag "marc = ",dump( $marc );
+
+ is_deeply( $rec, $marc, 'same' );
+
+}
+
+test_marc_clone( {
+ '900' => [{ 'a' => '900a', 'b' => '900b', subfields => [ qw/a 0 b 0/ ] }],
+ '901' => [{ 'c' => '901c', subfields => [ qw/c 0/ ] }],
+} );
+