The following module was proposed for inclusion in the Module List:
modid: HTML::FromArrayref
DSLIP: Rdpfp
description: Generate HTML from arrayrefs
userid: NICWOLFF (Nic Wolff)
chapterid: 15 (World_Wide_Web_HTML_HTTP_CGI)
communities:
similar:
HTML::LoL
rationale:
The existing HTML generation modules, such as HTML:LoL, don't make
it easy to programmatically skip a tag or an attribute, so here's a
simple module that takes a list of arrayrefs and renders them as
HTML elements, replacing any whose tag names are false with their
contents. This simple change makes it much more powerful and
expressive:
print HTML [ $is_bold && b => 'is this bold?' ];
and please see the examples in the POD as well.
Also, I've used simpler syntax to denote already-escaped text: if
an element's tag name (the first item in its arrayref) is an
arrayref, then the first item in that arrayref is inserted into the
HTML without being escaped â so you can just do
print HTML [ p => 'the following text was ', [[
'<b>already escaped</b>' ]];
This is a module my team has been using for many years in corporate
Perl applications, and now I'd like to add it to CPAN. Please let me
know if you think this would be appropriate! Thank you for your
time.
enteredby: NICWOLFF (Nic Wolff)
enteredon: Thu Dec 1 07:20:01 2011 GMT
The resulting entry would be:
HTML::
::FromArrayref Rdpfp Generate HTML from arrayrefs NICWOLFF
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5b800000_8e7464049f95e7f5&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=5b800000_8e7464049f95e7f5&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=HTML%3A%3AFromArrayref