On Sun, 01 May 2016 04:12:34 -0700,
alex.ja...@gmail.com wrote:
> This bug report is somewhat related to
>
https://rt.perl.org/Ticket/Display.html?id=128046
>
> get() crashes with a weird error if the stream has ended.
>
> Command:
> perl6 -ne 'get' <<< $'hello\nworld\ntest'
>
> Result:
> world
> Nil
> readline requires an object with REPR MVMOSHandle
> in block <unit> at -e line 1
>
> But it works if the number of lines is even.
>
> Command:
> perl6 -ne 'get' <<< $'hello\nworld'
>
> Result:
> world
>
>
> It should not crash.
lines() appears to have a similar affliction, though I don't see any difference if the number of lines is even.
$ cat foo.txt
a
b
c
$ perl6 -ne '@ = lines' foo.txt
readline requires an object with REPR MVMOSHandle
in block <unit> at -e line 1
$ perl6 -ne 'lines.eager' foo.txt