--- trunk/run.pl 2005/12/18 21:06:51 287 +++ trunk/run.pl 2005/12/18 23:34:24 291 @@ -93,7 +93,7 @@ my $input_db = new WebPAC::Input( module => $input_module, code_page => $config->{webpac}->{webpac_encoding}, - limit_mfn => $input->{limit}, + limit => $input->{limit}, lookup => $lookup, ); $log->logdie("can't create input using $input_module") unless ($input); @@ -125,16 +125,22 @@ ); } - for ( 0 ... $input_db->size ) { + foreach my $pos ( 0 ... $input_db->size ) { my $row = $input_db->fetch || next; - my $mfn = $row->{'000'}->[0] || die "can't find MFN"; + my $mfn = $row->{'000'}->[0]; + + if (! $mfn || $mfn !~ m#^\d+$#) { + $log->warn("record $pos doesn't have valid MFN but '$mfn', using $pos"); + $mfn = $pos; + push @{ $row->{'000'} }, $pos; + } my $ds = $n->data_structure($row); $est->add( - id => $input->{name} . "#" . $mfn, + id => $input->{name} . "/" . $mfn, ds => $ds, type => $config->{hyperestraier}->{type}, );