1 package HTML::Zoom::Producer::BuiltIn;
4 use warnings FATAL => 'all';
5 use base qw(HTML::Zoom::SubObject);
8 my ($self, $stream) = @_;
11 map $self->event_to_html($_),
12 $self->_zconfig->stream_utils->stream_to_array($stream)
15 sub html_from_events {
16 my ($self, $events) = @_;
17 join '', map $self->event_to_html($_), @$events;
21 my ($self, $evt) = @_;
23 if (defined $evt->{raw}) {
25 } elsif ($evt->{type} eq 'OPEN') {
28 .(defined $evt->{raw_attrs}
31 my @names = @{$evt->{attr_names}};
33 ? join(' ', '', map qq{${_}="${\$evt->{attrs}{$_}}"}, @names)
37 .($evt->{is_in_place_close} ? ' /' : '')
39 } elsif ($evt->{type} eq 'CLOSE') {
41 } elsif ($evt->{type} eq 'EMPTY') {
44 die "No raw value in event and no special handling for type ".$evt->{type};