Line 0
Link Here
|
0 |
- |
1 |
use strict; |
|
|
2 |
use warnings; |
3 |
|
4 |
use MARC::Field; |
5 |
|
6 |
sub customize { |
7 |
my ($record)= @_; |
8 |
#this is ONLY EXAMPLE code; please create your own customizations here |
9 |
|
10 |
#We clear e.g. field 001 |
11 |
my $f1= $record->field('001'); |
12 |
my $oldid= $f1->data(); |
13 |
$f1->update(''); |
14 |
#We add a 005 if it does not exist |
15 |
if( !$record->field('005') ) { |
16 |
$f1=MARC::Field->new('005', '00000000000000.00'); |
17 |
$record->insert_fields_ordered($f1); |
18 |
} |
19 |
#We add e.g. a local note 590 |
20 |
$f1=MARC::Field->new('590','','',a=>'Old id:'.$oldid); |
21 |
$record->insert_fields_ordered($f1); |
22 |
|
23 |
} |
24 |
|
25 |
1; |