Stop permanently enabling autoflush on the debug filehandle
Peter Rabbitson [Mon, 7 Jul 2014 22:45:32 +0000 (00:45 +0200)]
lib/DBIx/Class/Storage/Statistics.pm
t/storage/debug.t

index 6c77ffb..1ee5299 100644 (file)
@@ -67,7 +67,6 @@ sub debugfh {
         or die("Duplication of STDERR for debug output failed (perhaps your STDERR is closed?): $!");
     }
 
-    $fh->autoflush();
     $self->_debugfh($fh);
   }
 
@@ -85,7 +84,7 @@ sub print {
 
   return if $self->silence;
 
-  $self->debugfh->print($msg);
+  $self->debugfh->printflush($msg);
 }
 
 =head2 silence
index ce85bc5..77f7e42 100644 (file)
@@ -23,7 +23,6 @@ $schema->storage->debugobj(DBIx::Class::Storage::Statistics->new);
 
 ok ( $schema->storage->debug(1), 'debug' );
 $schema->storage->debugfh($lfn->openw);
-$schema->storage->debugfh->autoflush(1);
 $schema->resultset('CD')->count;
 
 my @loglines = $lfn->slurp;