</body>
END
-sub src_stream { HTML::Zoom::Parser::BuiltIn->html_to_stream($tmpl); }
+sub src_stream { HTML::Zoom::Parser::BuiltIn->new->html_to_stream($tmpl); }
-sub html_sink { HTML::Zoom::Producer::BuiltIn->html_from_stream($_[0]) }
+sub html_sink { HTML::Zoom::Producer::BuiltIn->new->html_from_stream($_[0]) }
my $fb = HTML::Zoom::FilterBuilder->new;
($expect = $tmpl) =~ s/class="main"/class="main foo"/;
is(
- run_for { $_->add_attribute({ name => 'class', value => 'foo' }) },
+ run_for { $_->add_to_attribute({ name => 'class', value => 'foo' }) },
$expect,
'add attribute on existing attribute'
);
($expect = $tmpl) =~ s/class="main"/class="main" foo="bar"/;
is(
- run_for { $_->add_attribute({ name => 'foo', value => 'bar' }) },
+ run_for { $_->add_to_attribute({ name => 'foo', value => 'bar' }) },
$expect,
'add attribute on non existing attribute'
);
$_->repeat_content(
[
sub {
- HTML::Zoom::CodeStream->from_array(
+ HTML::Zoom::ArrayStream->new({ array => [
(filter
filter($_ => '.name' => $r_content->('mst'))
=> '.career' => $r_content->('Chainsaw Wielder')),
- HTML::Zoom::CodeStream->from_array(@between)
- )->flatten
+ HTML::Zoom::ArrayStream->new({ array => \@between })
+ ] })->flatten
},
sub {
filter