Skip to content

Commit ebb6f53

Browse files
committed
[io grant] Document IO::Handle.nl-out attribute
1 parent 9945c75 commit ebb6f53

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/Type/IO/Handle.pod6

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,29 @@ L«C<lines>|/routine/lines».
653653
}
654654
=end code
655655
656+
=head2 method nl-out
657+
658+
Defined as:
659+
660+
has Str:D $.nl-out is rw = "\n";
661+
662+
One of the attributes that can be set via C<.new> or L<open>.
663+
Defaults to C<"\n">. Takes a L<Str> specifying output line ending for this
664+
handle, to be used by methods L«C<.put>|/type/IO::Handle#method_put»
665+
and L«C<.say>|/type/IO::Handle#method_say».
666+
667+
=begin code :skip-test
668+
with 'test'.IO {
669+
given .open: :w {
670+
.put: 42;
671+
.nl-out = 'foo';
672+
.put: 42;
673+
.close;
674+
}
675+
.slurp.perl.say; # OUTPUT: «"42\n42foo"»
676+
}
677+
=end code
678+
656679
=head2 method opened
657680
658681
Defined as:

0 commit comments

Comments
 (0)