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;