use utf8;
use strict;
use warnings; no warnings "redefine";
use Loader qw(line_printer);

sub line_print_end() {
	{
		no warnings 'once';
		return if $Db::test_output;
	}
	if (    $Db::pr_fh
		and !defined $Db::OutHandle || "$Db::pr_fh" ne "$Db::OutHandle"
		and !ref $Db::pr_fd         || "$Db::pr_fd" ne "$Db::pr_fh" )
	{
		$Db::pr_fh->close;
	}
	else {    # s. RT#423909:
		my $oldhandle = select $Db::pr_fh;
		$| = 1;
		select $oldhandle;
	}

	no warnings 'once';
	$Db::pr_fh = $Db::OutHandle;
	$Db::pr_fh_modus = 0;
}

1;
