develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #112244] PerlIO_unread fails easily when :crlf is active

Thread Previous | Thread Next
Leon Timmermans via RT
July 6, 2012 02:18
[perl #112244] PerlIO_unread fails easily when :crlf is active
Message ID:
On Wed Apr 04 23:23:51 2012, LeonT wrote:
> On Wed Apr 04 10:47:08 2012, wrote:
> > Hi,
> > 
> >   I ran into trouble using IO::Unread which uses PerlIO_unread to unread
> > to a handle, every now and then it would unread less than what it should
> > have. Discussing this on #p5p it turned out that the :crlf layer was the
> > problem (binmode-ing the handle solved the issue) and leont asked me to
> > file a bug about it. I can supply a test case (relying on IO::Unread) if
> > necessary.
> > 
> > regards,
> The problem is that :crlf doesn't fall back on :pending the way :perlio
> does when the unread data doesn't fit into its own buffer. Instead it
> just rejects them.
> Leon

I think this should fix it, but I don't have a proper test just yet.


via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About