From 895117f41e81b737272187a9a6d9005226266544 Mon Sep 17 00:00:00 2001
From: Andrew Yates <ayates@ebi.ac.uk>
Date: Fri, 2 Dec 2011 10:20:48 +0000
Subject: [PATCH] Removing IO::File and going back to the old ways

---
 misc-scripts/db/dump_mysql.pl | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/misc-scripts/db/dump_mysql.pl b/misc-scripts/db/dump_mysql.pl
index 35d10dbaba..b414e394a6 100755
--- a/misc-scripts/db/dump_mysql.pl
+++ b/misc-scripts/db/dump_mysql.pl
@@ -13,7 +13,6 @@ use Getopt::Long;
 use IO::Compress::Gzip qw/gzip $GzipError/;
 use Pod::Usage;
 use Sys::Hostname;
-use IO::File;
 
 my $PIGZ_BINARY = 'pigz';
 my $PIGZ_PROCESSORS = 2; #ensdb-1-* only have 4 cores
@@ -73,8 +72,7 @@ sub logging {
   if ($o->{log}) {
     $o->{verbose} = 1;
     my $file = $o->{log};
-    my $fh = IO::File->new($file, 'w');
-    $fh->autoflush(1);
+    open my $fh, '>', $file or die "Cannot open log file '${file}' for writing: $!";
     my $oldfh = select($fh);
     $self->{oldfh} = $oldfh;
   }
-- 
GitLab