Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added docs for method say and added some missing text to print-nl. ti…
…motimo++
  • Loading branch information
Jan-Olof Hendig committed May 30, 2016
1 parent 318a5d8 commit 258f903
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions doc/Type/IO/Handle.pod
Expand Up @@ -86,15 +86,28 @@ to write bytes.
method print-nl(IO::Handle:D: --> True)
Writes a newline to the filehandle. The newline marker defaults
to C<\n> unless another marker has been specified in the call to
L<open>.
Writes a newline to the filehandle. The newline marker, which is stored
in the attribute C<$.nl-out>, defaults to C<\n> unless another marker has
been specified in the call to L<open>.
my $fh = open 'path/to/file', :w, nl-out => "\r\n";
my $fh = open 'path/to/file', :w, nl-out => "\r\n";
$fh.print("some text");
$fh.print-nl; # \r\n
$fh.close;
=head2 method say
method say(IO::Handle:D: |)
This method is identical to L<print|/type/IO::Handle#method_print> except
that it stringifies its arguments by calling C<.gist> on them and
auto-appends a newline, with a call to L<print-nl|/type/IO::Handle#method_print-nl>,
after the final argument.
my $fh = open 'path/to/file', :w;
$fh.say(Complex.new(3, 4)); # 3+4i\n
$fh.close;
=head2 method read
method read(IO::Handle:D: Int(Cool:D) $bytes --> Blob)
Expand Down

0 comments on commit 258f903

Please sign in to comment.