Skip Menu |

This queue is for tickets about the POE-Filter-Zlib CPAN distribution.

Report information
The Basics
Id: 36037
Status: resolved
Worked: 10 min
Priority: 0/
Queue: POE-Filter-Zlib

People
Owner: BINGOS [...] cpan.org
Requestors: hinrik.sig [...] gmail.com
Cc:
AdminCc:

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



Subject: Stream.pm needs get_pending()
Subject: get_pending.diff
--- /usr/lib/perl5/site_perl/5.10.0/POE/Filter/Zlib/Stream.pm 2008-03-07 07:41:29.000000000 +0000 +++ /home/hinrik/zlib.pm 2008-05-20 10:33:44.000000000 +0000 @@ -35,6 +35,20 @@ $self->{BUFFER} .= join '', @{ $raw_lines }; } +sub get_pending { + my $self = shift; + return unless length $self->{BUFFER}; + + my @return; + while(1) { + my $next = $self->get_one(); + last unless @$next; + push @return, @$next; + } + + return \@return; +} + sub get_one { my $self = shift;
Diff applied, many thanks. Version 1.96 released to CPAN.