Skip to content

Commit

Permalink
[io grant] Document IO::Handle.nl-in
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed May 14, 2017
1 parent 3eaf7f2 commit f7e75c1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/Type/IO/Handle.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,28 @@ This returns a value that the operating system would understand as a "file descr
is suitable for passing to a native function that requires a file descriptor as an
argument such as C<fcntl> or C<ioctl>.
=head2 method .nl-in
Defined as:
method nl-in(--> Proxy:D) is rw
One of the attributes that can be set via C<.new>.
Defaults to C<["\x0A", "\r\n"]>
Takes either a L<Str> or L<Array> of C<Str> specifying line ending(s) for this
handle. If C<.chomp> attribute is set to C<True>, will strip these endings
in routines that C<chomp>, such as L«C<get>|/routine/get» and
L«C<lines>|/routine/lines».
=begin code :skip-test
with 'test'.IO {
.spurt: '1foo2bar3foo'; # write some data into our test file
my $fh will leave {.close} = .open; # can also set .nl-in via .open arg
$fh.nl-in = [<foo bar>]; # set two possible line endings to use;
$fh.lines.say; # OUTPUT: ("1", "2", "3").Seq
}
=end code
=head2 method opened
Defined as:
Expand Down

0 comments on commit f7e75c1

Please sign in to comment.