Skip to content

Commit

Permalink
Revert "Added doc for the :close adverb in slurp-rest"
Browse files Browse the repository at this point in the history
This reverts commit 71fde8d.

No spec, no docs. Doc issue #883
  • Loading branch information
AlexDaniel committed Feb 13, 2017
1 parent bff3965 commit 09a4093
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions doc/Type/IO/Handle.pod6
Expand Up @@ -277,20 +277,13 @@ Return the current position of the file pointer in bytes.
=head2 method slurp-rest
multi method slurp-rest(IO::Handle:D: :$bin!, :$close --> Buf)
multi method slurp-rest(IO::Handle:D: :$enc, :$close --> Str)
multi method slurp-rest(IO::Handle:D: :$bin! --> Buf)
multi method slurp-rest(IO::Handle:D: :$enc --> Str)
Returns the remaining content of the file from the current file position
Return the remaining content of the file from the current file position
(which may have been set by previous reads or by C<seek>.) If the
adverb C<:bin> is provided a L<Buf> will be returned,
otherwise the return value will be a C<Str> with the optional encoding C<:enc>.
Specifying the adverb C<:close> will cause the filehandle to be closed when
the call has finished.
=for code :skip-test
my $fh = open("content.txt");
my $line = $fh.get;
my $rest-of-file = $fh.slurp-rest(:close);
otherwise the return will be a C<Str> with the optional encoding C<:enc>.
=head2 method Supply
Expand Down

0 comments on commit 09a4093

Please sign in to comment.