Skip to content

Commit 318a5d8

Browse files
author
Jan-Olof Hendig
committed
Added docs to method print-nl in class IO::Handle
1 parent c7294bb commit 318a5d8

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

doc/Type/IO/Handle.pod

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ and the stream may be buffered.
2929
3030
=head2 method eof
3131
32-
Returns L<Bool::True> if the read operations have exhausted the content of the file.
32+
Returns C<True> if the read operations have exhausted the content of the file.
3333
3434
=head2 method lines
3535
@@ -82,6 +82,19 @@ to write bytes.
8282
$fh.print("some text\n");
8383
$fh.close;
8484
85+
=head2 method print-nl
86+
87+
method print-nl(IO::Handle:D: --> True)
88+
89+
Writes a newline to the filehandle. The newline marker defaults
90+
to C<\n> unless another marker has been specified in the call to
91+
L<open>.
92+
93+
my $fh = open 'path/to/file', :w, nl-out => "\r\n";
94+
$fh.print("some text");
95+
$fh.print-nl; # \r\n
96+
$fh.close;
97+
8598
=head2 method read
8699
87100
method read(IO::Handle:D: Int(Cool:D) $bytes --> Blob)
@@ -182,13 +195,13 @@ argument such as C<fcntl> or C<ioctl>.
182195
183196
method opened(IO::Handle:D: --> Bool)
184197
185-
Returns L<Bool::True> if the handle is open.
198+
Returns C<True> if the handle is open.
186199
187200
=head2 method t
188201
189202
method t(IO::Handle:D: --> Bool)
190203
191-
Returns L<Bool::True> if the handle is opened to a tty.
204+
Returns C<True> if the handle is opened to a tty.
192205
193206
=head1 Related roles and classes
194207

0 commit comments

Comments
 (0)