153 |
|
|
154 |
my $config = new WebPAC::Config( path => $config_path ); |
my $config = new WebPAC::Config( path => $config_path ); |
155 |
|
|
156 |
|
WebPAC::Normalize::_debug( $debug - 1 ) if $debug > 1; |
157 |
|
|
158 |
#print "config = ",dump($config) if ($debug); |
#print "config = ",dump($config) if ($debug); |
159 |
|
|
160 |
die "no databases in config file!\n" unless ($config->databases); |
die "no databases in config file!\n" unless ($config->databases); |
331 |
|
|
332 |
$log->debug("calling $module->new(",dump( $output ),")"); |
$log->debug("calling $module->new(",dump( $output ),")"); |
333 |
my $out = new $module->new( $output ); |
my $out = new $module->new( $output ); |
334 |
$out->init; |
if ( $out->init ) { |
335 |
|
push @output_modules, $out; |
336 |
push @output_modules, $out; |
} else { |
337 |
|
$log->warn("SKIPPED $module"); |
338 |
|
} |
339 |
} |
} |
340 |
|
|
341 |
|
|
567 |
marc_encoding => 'utf-8', |
marc_encoding => 'utf-8', |
568 |
load_row_coderef => sub { |
load_row_coderef => sub { |
569 |
my ($database,$input,$mfn) = @_; |
my ($database,$input,$mfn) = @_; |
570 |
warn "### load_row($database,$input,$mfn) from data_structure\n"; |
#warn "### load_row($database,$input,$mfn) from data_structure\n"; |
571 |
return $store->load_row( |
return $store->load_row( |
572 |
database => $database, |
database => $database, |
573 |
input => $input, |
input => $input, |
604 |
if ($marc) { |
if ($marc) { |
605 |
my $i = 0; |
my $i = 0; |
606 |
|
|
607 |
while (my $fields = WebPAC::Normalize::_get_marc_fields( fetch_next => 1 ) ) { |
while (my $fields = WebPAC::Normalize::MARC::_get_marc_fields( fetch_next => 1 ) ) { |
608 |
$marc->add( |
$marc->add( |
609 |
id => $mfn . ( $i ? "/$i" : '' ), |
id => $mfn . ( $i ? "/$i" : '' ), |
610 |
fields => $fields, |
fields => $fields, |
611 |
leader => WebPAC::Normalize::_get_marc_leader(), |
leader => WebPAC::Normalize::MARC::_get_marc_leader(), |
612 |
row => $row, |
row => $row, |
613 |
); |
); |
614 |
$i++; |
$i++; |