4

I tried this, but it didn't work:

$*OUT.autoflush( 0 );
Elizabeth Mattijsen
  • 25,654
  • 3
  • 75
  • 105
sid_com
  • 24,137
  • 26
  • 96
  • 187

2 Answers2

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.

moritz
  • 12,710
  • 1
  • 41
  • 63
  • [2014 updates from the #perl6 log](http://irclog.perlgeek.de/perl6/search/?nick=&q=autoflush) 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. – raiph Jan 13 '15 at 19:38
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.

brian d foy
  • 129,424
  • 31
  • 207
  • 592