93 |
my $input_db = new WebPAC::Input( |
my $input_db = new WebPAC::Input( |
94 |
module => $input_module, |
module => $input_module, |
95 |
code_page => $config->{webpac}->{webpac_encoding}, |
code_page => $config->{webpac}->{webpac_encoding}, |
96 |
limit_mfn => $input->{limit}, |
limit => $input->{limit}, |
97 |
lookup => $lookup, |
lookup => $lookup, |
98 |
); |
); |
99 |
$log->logdie("can't create input using $input_module") unless ($input); |
$log->logdie("can't create input using $input_module") unless ($input); |
125 |
); |
); |
126 |
} |
} |
127 |
|
|
128 |
for ( 0 ... $input_db->size ) { |
foreach my $pos ( 0 ... $input_db->size ) { |
129 |
|
|
130 |
my $row = $input_db->fetch || next; |
my $row = $input_db->fetch || next; |
131 |
|
|
132 |
my $mfn = $row->{'000'}->[0] || die "can't find MFN"; |
my $mfn = $row->{'000'}->[0]; |
133 |
|
|
134 |
|
if (! $mfn || $mfn !~ m#^\d+$#) { |
135 |
|
$log->warn("record $pos doesn't have valid MFN but '$mfn', using $pos"); |
136 |
|
$mfn = $pos; |
137 |
|
push @{ $row->{'000'} }, $pos; |
138 |
|
} |
139 |
|
|
140 |
my $ds = $n->data_structure($row); |
my $ds = $n->data_structure($row); |
141 |
|
|
142 |
$est->add( |
$est->add( |
143 |
id => $input->{name} . "#" . $mfn, |
id => $input->{name} . "/" . $mfn, |
144 |
ds => $ds, |
ds => $ds, |
145 |
type => $config->{hyperestraier}->{type}, |
type => $config->{hyperestraier}->{type}, |
146 |
); |
); |