factor out ArrayStream, update new stream types to respect peek
[catagits/HTML-Zoom.git] / lib / HTML / Zoom / FilterStream.pm
index c698159..a0bc6b7 100644 (file)
@@ -2,6 +2,7 @@ package HTML::Zoom::FilterStream;
 
 use strict;
 use warnings FATAL => 'all';
+use base qw(HTML::Zoom::StreamBase);
 
 sub new {
   my ($class, $args) = @_;
@@ -10,12 +11,13 @@ sub new {
       _stream => $args->{stream},
       _match => $args->{match},
       _filter => $args->{filter},
+      _zconfig => $args->{zconfig},
     },
     $class
   );
 }
 
-sub next {
+sub _next {
   my ($self) = @_;
 
   # if our main stream is already gone then we can short-circuit