Bug 29844: Fix ->search occurrences
[koha-ffzg.git] / admin / koha2marclinks.pl
index 842364d..b60e4fd 100755 (executable)
@@ -22,9 +22,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use Koha::Database;
-use C4::Auth;
-use C4::Biblio;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::BiblioFrameworks;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
@@ -92,7 +91,7 @@ my @loop_data;
 foreach my $col ( @cols ) {
     my $found;
     my $readonly = $col =~ /\.(biblio|biblioitem|item)number$/;
-    foreach my $row ( $kohafields->search({ kohafield => $col }) ) {
+    foreach my $row ( $kohafields->search({ kohafield => $col })->as_list ) {
         $found = 1;
         push @loop_data, {
             kohafield    => $col,