Help for this page
html { head { title { text "Title" } }; ... p { class_ "warning"; text "paragraph" } } };
html { head { title {} "Title" }; ... p { class_ "warning" } "paragraph" } };
sub _elem { my ($elem_name, $content_fn, $text) = @_; #! added $text arg ... eval "sub $_(&@) { _elem('$_',\@_) }" for @$elems; #! proto eval "sub ${_}_(\$) { _attr('$_',\@_) }" for @$attrs; }