factor out ArrayStream, update new stream types to respect peek
[catagits/HTML-Zoom.git] / lib / HTML / Zoom / CodeStream.pm
CommitLineData
456a815d 1package HTML::Zoom::CodeStream;
2
3use strict;
4use warnings FATAL => 'all';
5f74b883 5use base qw(HTML::Zoom::StreamBase);
456a815d 6
456a815d 7sub new {
8 my ($class, $args) = @_;
d80786d0 9 bless({ _code => $args->{code}, _zconfig => $args->{zconfig} }, $class);
456a815d 10}
11
b5a48c47 12sub _next {
13 $_[0]->{_code}->();
456a815d 14}
15
161;
17