Skip to content

Commit

Permalink
IO.autoflush
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 19, 2010
1 parent 92e914a commit f236549
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/IO.pm
@@ -1,6 +1,7 @@
class IO is Cool {
has $!PIO;
has $!ins;
has $.autoflush is rw;

multi method close() is export {
try {
Expand Down Expand Up @@ -39,6 +40,7 @@ class IO is Cool {
for @items -> $item {
(pir::descalarref__PP($!PIO)).print($item);
}
pir::descalarref__PP($!PIO).flush() if $.autoflush;
}
$! ?? fail($!) !! Bool::True;
}
Expand Down

0 comments on commit f236549

Please sign in to comment.