PT-2052 - Tools should default to unbuffered stdout/stderr

- Added option --[no]buffer-stdout, enabled by default
This commit is contained in:
Sveta Smirnova
2025-08-05 18:24:01 +03:00
parent 607f5a2188
commit 734d6231c2
26 changed files with 272 additions and 0 deletions

View File

@@ -668,6 +668,10 @@ sub get_opts {
}
}
if ( exists $self->{opts}->{'buffer-stdout'} && $self->{opts}->{'buffer-stdout'}->{got} ) {
STDOUT->autoflush(1 - $self->{opts}->{'buffer-stdout'}->{value});
}
if ( @ARGV && $self->{strict} ) {
$self->save_error("Unrecognized command-line options @ARGV");
}