1 package HTML::Zoom::Producer::BuiltIn;
4 use warnings FATAL => 'all';
7 my ($class, $stream) = @_;
9 while (my ($evt) = $stream->next) { $html .= $class->_event_to_html($evt) }
13 sub html_from_events {
14 my ($class, $events) = @_;
15 join '', map $class->_event_to_html($_), @$events;
19 my ($self, $evt) = @_;
21 if (defined $evt->{raw}) {
23 } elsif ($evt->{type} eq 'OPEN') {
26 .(defined $evt->{raw_attrs}
29 my @names = @{$evt->{attr_names}};
31 ? join(' ', '', map qq{${_}="${\$evt->{attrs}{$_}}"}, @names)
35 .($evt->{is_in_place_close} ? ' /' : '')
37 } elsif ($evt->{type} eq 'CLOSE') {
39 } elsif ($evt->{type} eq 'EMPTY') {
42 die "No raw value in event and no special handling for type ".$evt->{type};