From: Peter Rabbitson Date: Mon, 7 Jul 2014 22:45:32 +0000 (+0200) Subject: Stop permanently enabling autoflush on the debug filehandle X-Git-Tag: v0.082800~155 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9f71ab2;p=dbsrgits%2FDBIx-Class.git Stop permanently enabling autoflush on the debug filehandle --- diff --git a/lib/DBIx/Class/Storage/Statistics.pm b/lib/DBIx/Class/Storage/Statistics.pm index 6c77ffb..1ee5299 100644 --- a/lib/DBIx/Class/Storage/Statistics.pm +++ b/lib/DBIx/Class/Storage/Statistics.pm @@ -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 diff --git a/t/storage/debug.t b/t/storage/debug.t index ce85bc5..77f7e42 100644 --- a/t/storage/debug.t +++ b/t/storage/debug.t @@ -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;