Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO.eof no longer exists? IO::Endable documentation? #370

Closed
p6rt opened this issue Oct 26, 2008 · 9 comments
Closed

IO.eof no longer exists? IO::Endable documentation? #370

p6rt opened this issue Oct 26, 2008 · 9 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 26, 2008

Migrated from rt.perl.org#60142 (status was 'resolved')

Searchable as RT60142$

@p6rt
Copy link
Author

p6rt commented Oct 26, 2008

From @masak

Rakudo r32151 contains a bug which makes it "read" a nonexistent blank
line at the end of files.

$ wc README | awk '{ print $1 }'
102

$ <README ./perl6 -e 'my $l = 0; while !$*IN.eof { $l++; my $dummy =
=$*IN; }; say $l'
103

@p6rt
Copy link
Author

p6rt commented Oct 26, 2008

From @masak

As a funny bonus, Parrot segfaults if the dummy assignment is left out
inside the loop​:

$ <README ./perl6 -e 'my $l = 0; while !$*IN.eof { $l++; =$*IN; }; say $l'
Segmentation fault

@p6rt
Copy link
Author

p6rt commented Dec 9, 2008

From @jnthn

Appears to be a bug in Parrot's .eof() method; sent a ticket on Parrot
for looking into this.

@p6rt
Copy link
Author

p6rt commented Dec 9, 2008

@jnthn - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 13, 2009

From @jnthn

See also related ticket
http://rt.perl.org/rt3/Ticket/Display.html?id=61224 - looks like we may
have to do our own thing in Rakudo to make this work...

@p6rt
Copy link
Author

p6rt commented Jul 1, 2009

From @pmichaud

On Sun Oct 26 12​:27​:26 2008, masak wrote​:

Rakudo r32151 contains a bug which makes it "read" a nonexistent blank
line at the end of files.

$ wc README | awk '{ print $1 }'
102

$ <README ./perl6 -e 'my $l = 0; while !$*IN.eof { $l++; my $dummy =
=$*IN; }; say $l'
103

IO.pod​:1207 claims that "IO.eof" is gone, to be replaced with
C<IO​::Endable>. But I can't seem to find any specification or
documentation on Endable.

So, I'm converting this ticket to a specbug, in hopes that p6l or
someone can sort it out.

If it turns out that IO.eof still exists, then should it continue to
have the Perl 5 behavior of performing a getc/ungetc to check EOF?

Pm

@p6rt
Copy link
Author

p6rt commented Aug 4, 2009

From wayland@wayland.id.au

Changed the spec so it refers to IO​::Seekable.eoi instead, since that
seems to perform the same function.

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

From @moritz

IO.eof seems to work now, and is documented in S32​::IO. All IO​::Endable
craziness is gone. Nothing to see here, move along :-)

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Aug 7, 2012
@p6rt p6rt added the spec label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant