8 |
|
|
9 |
use WebPAC::Common 0.02; |
use WebPAC::Common 0.02; |
10 |
use WebPAC::Parser 0.04; |
use WebPAC::Parser 0.04; |
|
use WebPAC::Lookup 0.03; |
|
11 |
use WebPAC::Input 0.11; |
use WebPAC::Input 0.11; |
12 |
use WebPAC::Store 0.03; |
use WebPAC::Store 0.03; |
13 |
use WebPAC::Normalize 0.11; |
use WebPAC::Normalize 0.11; |
315 |
|
|
316 |
my $input_module = $config->webpac('inputs')->{$type}; |
my $input_module = $config->webpac('inputs')->{$type}; |
317 |
|
|
318 |
|
my @lookups = $parser->have_lookup_create($database, $input); |
319 |
|
|
320 |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", |
321 |
$input->{lookup} ? "lookup '$input->{lookup}'" : "" |
@lookups ? "lookup ".join(", ", @lookups) : "" |
322 |
); |
); |
323 |
|
|
324 |
|
warn "lookups = ", dump( @lookups ); |
325 |
|
|
326 |
if ($stats) { |
if ($stats) { |
327 |
# disable modification of records if --stats is in use |
# disable modification of records if --stats is in use |
328 |
delete($input->{modify_records}); |
delete($input->{modify_records}); |
352 |
); |
); |
353 |
$log->logdie("can't create input using $input_module") unless ($input); |
$log->logdie("can't create input using $input_module") unless ($input); |
354 |
|
|
355 |
|
if (defined( $input->{lookup} )) { |
356 |
|
$log->warn("$database/", $input->{name}, " has depriciated lookup definition, removing it..."); |
357 |
|
delete( $input->{lookup} ); |
358 |
|
} |
359 |
|
|
360 |
my $maxmfn = $input_db->open( |
my $maxmfn = $input_db->open( |
361 |
path => $input->{path}, |
path => $input->{path}, |
362 |
code_page => $input->{encoding}, # database encoding |
code_page => $input->{encoding}, # database encoding |