package HTML::Zoom::StreamUtils;
-use strict;
-use warnings FATAL => 'all';
+use strictures 1;
use base qw(HTML::Zoom::SubObject);
use Scalar::Util ();
use HTML::Zoom::CodeStream;
use HTML::Zoom::FilterStream;
+use HTML::Zoom::ArrayStream;
sub stream_from_code {
my ($self, $code) = @_;
sub stream_from_array {
my $self = shift;
my @array = @_;
- $self->stream_from_code(sub {
- return unless @array;
- return shift @array;
- });
+ HTML::Zoom::ArrayStream->new({
+ array => \@array,
+ zconfig => $self->_zconfig,
+ })
}
sub stream_concat {