1 package HTML::Zoom::Producer::BuiltIn;
4 use warnings FATAL => 'all';
6 sub new { bless({}, $_[0]) }
8 sub with_zconfig { shift }
10 sub html_from_stream {
11 my ($class, $stream) = @_;
13 while (my ($evt) = $stream->next) { $html .= $class->_event_to_html($evt) }
17 sub html_from_events {
18 my ($class, $events) = @_;
19 join '', map $class->_event_to_html($_), @$events;
23 my ($self, $evt) = @_;
25 if (defined $evt->{raw}) {
27 } elsif ($evt->{type} eq 'OPEN') {
30 .(defined $evt->{raw_attrs}
33 my @names = @{$evt->{attr_names}};
35 ? join(' ', '', map qq{${_}="${\$evt->{attrs}{$_}}"}, @names)
39 .($evt->{is_in_place_close} ? ' /' : '')
41 } elsif ($evt->{type} eq 'CLOSE') {
43 } elsif ($evt->{type} eq 'EMPTY') {
46 die "No raw value in event and no special handling for type ".$evt->{type};