--- trunk/run.pl 2005/12/18 21:06:46 286 +++ trunk/run.pl 2005/12/18 21:06:51 287 @@ -9,7 +9,7 @@ use WebPAC::Common 0.02; use WebPAC::Lookup; -use WebPAC::Input::ISIS 0.02; +use WebPAC::Input 0.03; use WebPAC::Store 0.03; use WebPAC::Normalize::XML; use WebPAC::Output::TT; @@ -90,20 +90,15 @@ $log->info("working on input $input->{path} [$input->{type}] using $input_module"); - sub new_input { - my $name = shift; - my $args = shift; - new $name->($args); - } - - my $input = new_input($input_module,{ + my $input_db = new WebPAC::Input( + module => $input_module, code_page => $config->{webpac}->{webpac_encoding}, limit_mfn => $input->{limit}, lookup => $lookup, - }); + ); $log->logdie("can't create input using $input_module") unless ($input); - my $maxmfn = $input->open( + my $maxmfn = $input_db->open( path => $input->{path}, code_page => $input->{encoding}, # database encoding ); @@ -130,9 +125,9 @@ ); } - for ( 0 ... $input->size ) { + for ( 0 ... $input_db->size ) { - my $row = $input->fetch || next; + my $row = $input_db->fetch || next; my $mfn = $row->{'000'}->[0] || die "can't find MFN";