Templa...t::HTML(3pm)
π Template::Declare::TagSet::HTML β the HTML tag set for Template::Declare π
okay bestie, welcome to Template::Declare::HTML (that's the manual page for Template::Declare::TagSet::HTML, from the User Contributed Perl Documentation corner of the universe π«Ά). This is the tag set that gives Template::Declare every single HTML tag you could ever want. Let's get into it β¨
πΈ NAME πΈ
Template::Declare::TagSet::HTML β the Template::Declare tag set for HTML. it's giving "I contain multitudes, and the multitudes are all <div>s" π
π SYNOPSIS π
normal use, like, the way you'd actually touch this on the user side:
# normal use on the user side:
use base 'Template::Declare';
use Template::Declare::Tags 'HTML';
template foo => sub {
html {
body {
}
}
};
and here's the deeper lore, the stuff happening inside Template::Declare::Tags:
# in Template::Declare::Tags:
use Template::Declare::TagSet::HTML;
my $tagset = Template::Declare::TagSet::HTML->new({
package => 'MyHTML',
namespace => 'html',
});
my $list = $tagset->get_tag_list();
print $_, $/ for @{ $list };
if ( $altern = $tagset->get_alternate_spelling('tr') ) {
print $altern;
}
if ( $tagset->can_combine_empty_tags('img') ) {
print q{<img src="blah.gif" />};
}
β¨ DESCRIPTION β¨
so Template::Declare::TagSet::HTML defines a full set of HTML tags for use in Template::Declare templates. all the elements for HTML 2, HTML 3, HTML 4, and XHTML 1 are in here. no cap, all of them π«Ά
most of the time you will not use this module directly β you'll load it via:
use Template::Declare::Tags 'HTML';
that's the move. that's the whole vibe. π
π METHODS π
π¦ new( PARAMS )
my $html_tag_set = Template::Declare::TagSet->new({
package => 'MyHTML',
namespace => 'html',
});
constructor, inherited from Template::Declare::TagSet. it's the glow-up your tag set gets before it does anything at all π
π¦ get_tag_list
my $list = $tag_set->get_tag_list();
returns an array ref of all the HTML tags defined by Template::Declare::TagSet::HTML. and here's the complete list, bestie, every single one, we do not gatekeep in this house π
h1h2h3h4h5h6pbrhrolullidldtddmenucodevarstrongemttuibblockquotepreimgaaddresscitesampdfnhtmlheadbasebodylinknextidtitlemetakbdstart_htmlend_htmlinputselectoptioncommentcharsetescapehtmldivtablecaptionthtdtrtrsupsubstrikeappletparamnobrembedbasefontstylespanlayerilayerfontframesetframescriptsmallbigareamapabbracronymbdocolcolgroupdelfieldsetiframeinslabellegendnoframesnoscriptobjectoptgroupqtheadtbodytfootblinkfontsizecentertextfieldtextareafilefieldpassword_fieldhiddencheckboxcheckbox_groupsubmitresetdefaultsradio_grouppopup_menubuttonautoescapescrolling_listimage_buttonstart_formend_formstartformendformstart_multipart_formend_multipart_formisindextmpfilenameuploadinfourl_encodedmultipartformcanvassectionarticleasidehgroupheaderfooternavfigurefigcaptionvideoaudioembedmarkprogressmetertimerubyrtrpbdiwbrcommanddetailsdatalistkeygenoutput
and yes bestie,trreally does show up twice andembedreally does show up twice in that list. that's not a typo on my end, that's canon. we reproduce the canon fr fr π
π¦ get_alternate_spelling( TAG )
$bool = $obj->get_alternate_spelling($tag);
returns the alternative spelling for a given tag if there is one, or undef otherwise. currently the mappings are:
trβrowtdβcellqβquotebaseβhtml_basetimeβdatetime
why tho? because the alternates are there to avoid conflicts with the Perl tr and q operators, the time function, and the base module β and td got changed so it stays consistent with table rows. iconic reasoning, honestly π
π¦ can_combine_empty_tags( TAG )
$bool = $obj->can_combine_empty_tags($tag);
tells you whether <tag></tag> can be squished down into a single token, <tag />. currently only a few HTML tags are allowed to be combined, and they are:
basemetalinkhrbrparamimgareainputcol
short list, elite list. periodt π
π AUTHOR π
Agent Zhang <agentzh@yahoo.cn>
π«Ά SEE ALSO π«Ά
Template::Declare::TagSet, Template::Declare::TagSet::XUL, Template::Declare::TagSet::RDF, Template::Declare::Tags, Template::Declare.
and that's the whole page, bestie π this was perl v5.34.0, dated 2022-06-17, straight out of Templa...t::HTML(3pm) β go forth and <div> responsibly, you absolute icon πβ¨π¦
π¦ where this page comes from
- debian bookworm: libtemplate-declare-perl 0.47-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtemplate-declare-perl 0.47-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtemplate-declare-perl 0.47-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtemplate-declare-perl 0.47-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtemplate-declare-perl 0.47-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms