Skip Menu |
 

This queue is for tickets about the IO-String CPAN distribution.

Report information
The Basics
Id: 5425
Status: resolved
Priority: 0/
Queue: IO-String

People
Owner: Nobody in particular
Requestors: cpan.org [...] antibozo.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.04
Fixed in: (no value)



Subject: paragraph mode is broken -- $eol should be set if $c ne "\n"
Download (untitled) / with headers
text/plain 780b
Instead of returning paragraphs when $/ = '', IO::String returns pairs of two consecutive lines. This breaks, among other things, reading from an IO::String in Net::LDAP::LDIF. Patch designed to emulate normal behavior for $/ and <STDIN>: --- IO/String.pm.orig Thu Jan 8 07:41:23 2004 +++ IO/String.pm Mon Feb 23 21:13:04 2004 @@ -220,11 +220,14 @@ my $c; while (defined($c = $self->getc)) { if ($c eq "\n") { - $eol++; - } elsif ($eol > 1) { + next if (++$eol >= 3); + } + elsif ($eol > 1) + { $self->ungetc($c); last; } + else { $eol = 0; } $para .= $c; } return $para; # XXX wantarray


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.