X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2Fexportauth.pl;h=14e30884d2d4eacef766dd31d61fdfdefbad46bf;hb=998289850f373a6b83d1ee4387161575fd6d3def;hp=4ac916c4d011cc3cbd892b5ba9f55eca029b1a01;hpb=c9ba8c899d854d4190df783f3f1aec2989d2cb10;p=koha-ffzg.git diff --git a/misc/exportauth.pl b/misc/exportauth.pl index 4ac916c4d0..14e30884d2 100755 --- a/misc/exportauth.pl +++ b/misc/exportauth.pl @@ -5,19 +5,12 @@ 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" }; -} +use Koha::Script; use C4::Context; -use C4::Output; # contains gettemplate -use C4::Biblio; use C4::Auth; my $outfile = $ARGV[0]; -open(OUT,">$outfile") or die $!; +open(my $fh, '>', $outfile) or die $!; my $dbh=C4::Context->dbh; #$dbh->do("set character_set_client='latin5'"); $dbh->do("set character_set_connection='utf8'"); @@ -25,6 +18,6 @@ $dbh->do("set character_set_connection='utf8'"); my $sth=$dbh->prepare("select marc from auth_header order by authid"); $sth->execute(); while (my ($marc) = $sth->fetchrow) { - print OUT $marc; + print $fh $marc; } -close(OUT); +close($fh);