1 package HTML::Zoom::Producer::BuiltIn;
4 use base qw(HTML::Zoom::SubObject);
7 my ($self, $stream) = @_;
10 map $self->event_to_html($_),
11 $self->_zconfig->stream_utils->stream_to_array($stream)
14 sub html_from_events {
15 my ($self, $events) = @_;
16 join '', map $self->event_to_html($_), @$events;
20 my ($self, $evt) = @_;
22 if (defined $evt->{raw}) {
24 } elsif ($evt->{type} eq 'OPEN') {
27 .(defined $evt->{raw_attrs}
30 my @names = @{$evt->{attr_names}};
32 ? join(' ', '', map qq{${_}="${\$evt->{attrs}{$_}}"}, @names)
36 .($evt->{is_in_place_close} ? ' /' : '')
38 } elsif ($evt->{type} eq 'CLOSE') {
40 } elsif ($evt->{type} eq 'EMPTY') {
43 die "No raw value in event and no special handling for type ".$evt->{type};