perl6/rakudo: How could I disable autoflush?
Asked Answered
W

2

4

I tried this, but it didn't work:

$*OUT.autoflush( 0 );
Watusi answered 20/2, 2011 at 14:32 Comment(0)
H
5

$*OUT.autoflush = False should disable it, and it runs without error, but it seems that parrot's IO still flushes automatically. So there currently doesn't seem to be an easy way.

Horsefly answered 22/2, 2011 at 16:26 Comment(1)
2014 updates from the #perl6 log boil down to autoflush being still not implemented in Rakudo at the Perl 6 level. In fact, $*OUT.autoflush = False currently gives me a compile error.Venice
B
1

Rakudo doesn't support autoflush. There's a note in 5to6-perlvar under the $OUTPUT_AUTOFLUSH entry.

Some examples from a long time ago mention an autoflush method, but that has disappeared:

$*ERR.autoflush = True;
$*ERR.say: "1. This is an error";
$*OUT.say: "2. This is standard out";

But that doesn't work:

No such method 'autoflush' for invocant of type 'IO::Handle'

I haven't seen any discussions about when this might show up as a feature, or a proclamation that it will never be a feature.

Bellflower answered 8/7, 2017 at 15:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.