Bug 30952: Header search - move tabs to the right (and other tweaks)
[koha-ffzg.git] / misc / batchImportMARCWithBiblionumbers.pl
index 24692fd..484f517 100755 (executable)
@@ -3,23 +3,17 @@
 # Written by TG on 10/04/2006
 use strict;
 #use warnings; FIXME - Bug 2505
-BEGIN {
-    # find Koha's Perl modules
-    # test carefully before changing this
-    use FindBin;
-    eval { require "$FindBin::Bin/kohalib.pl" };
-}
 
 # Koha modules used
 
+use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use MARC::Record;
+use C4::Biblio qw( GetMarcFromKohaField );
 use MARC::File::USMARC;
 use MARC::File::XML;
 use MARC::Batch;
-use Time::HiRes qw(gettimeofday);
-use Getopt::Long;
+use Time::HiRes qw( gettimeofday );
+use Getopt::Long qw( GetOptions );
 use IO::File;
 
 my  $input_marc_file = '';
@@ -52,7 +46,7 @@ my $fh = IO::File->new($input_marc_file); # don't let MARC::Batch open the file,
 my $batch = MARC::Batch->new( 'USMARC', $fh );
 $batch->warnings_off();
 $batch->strict_off();
-my ($tagfield,$biblionumtagsubfield) = &GetMarcFromKohaField("biblio.biblionumber","");
+my ($tagfield,$biblionumtagsubfield) = &GetMarcFromKohaField( "biblio.biblionumber" );
 
 my $i=0;
 while ( my $record = $batch->next() ) {
@@ -77,7 +71,7 @@ sub search {
                return("error",undef);
        }
        my $oAResult;
-       my $Anewq= new ZOOM::Query::PQF($nquery);
+       my $Anewq= ZOOM::Query::PQF->new($nquery);
        eval {
        $oAResult= $oAuth->search_pqf($nquery) ; 
        };