Templa...t::XUL(3pm)
π Template::Declare::TagSet::XUL π
okay bestie, welcome to a 3pm page β yes, that's a perl manual page, straight out of the User Contributed Perl Documentation section. no cap. this one's about Template::Declare::TagSet::XUL, and it's gonna be a ride π¦
β¨ NAME β¨
Template::Declare::TagSet::XUL β it's the Template::Declare tag set for XUL. that's it, that's the name π
β¨ SYNOPSIS β¨
so like, normal use on the user side? it's giving:
# normal use on the user side:
use base 'Template::Declare';
use Template::Declare::Tags 'XUL';
template main => sub {
xml_decl { 'xml', version => '1.0' };
groupbox {
caption { attr { label => 'Colors' } }
}
};
and then, over in Template::Declare::Tags, you do the whole thing:
# in Template::Declare::Tags:
use Template::Declare::TagSet::XUL;
my $tagset = Template::Declare::TagSet::XUL->new({
package => 'MyXUL',
namespace => 'xul',
});
my $list = $tagset->get_tag_list();
print $_, $/ for @{ $list };
if ( $altern = $tagset->get_alternate_spelling('template') ) {
print $altern;
}
if ( $tagset->can_combine_empty_tags('button') ) {
print q{<button label="OK" />};
}
iconic. moving on πΈ
β¨ DESCRIPTION β¨
Template::Declare::TagSet::XUL defines a full set of XUL tags for use in Template::Declare templates. π
here's the tea tho: you generally won't use this module directly, you'll just load it through this:
use Template::Declare::Tags 'XUL';
that's the whole move. slay β¨
β¨ METHODS β¨
π new( PARAMS )
my $html_tag_set = Template::Declare::TagSet->new({
package => 'MyXUL',
namespace => 'xul',
});
constructor, and it's inherited from Template::Declare::TagSet. we love a hand-me-down that actually works π
π get_tag_list
my $list = $tag_set->get_tag_list();
returns an array ref of all the RDF tags defined by Template::Declare::TagSet::RDF. π
and here's the complete list, extracted from http://www.xulplanet.com/references/elemref/refall_elemref.xml (only "<element name='...'>" were recognized):
"action""arrowscrollbox""bbox""binding""bindings""body""box""broadcaster""broadcasterset""browser""button""caption""checkbox""children""colorpicker""column""columns""command""commandset""conditions""constructor""content""deck""description""destructor""dialog""dialogheader""editor""field""getter""grid""grippy""groupbox""handler""handlers""hbox""iframe""image""implementation""key""keyset""label""listbox""listcell""listcol""listcols""listhead""listheader""listitem""member""menu""menubar""menuitem""menulist""menupopup""menuseparator""method""observes""overlay""page""parameter""popup""popupset""progressmeter""property""radio""radiogroup""rdf""resizer""resources""richlistbox""row""rows""rule""script""scrollbar""scrollbox""separator""setter""spacer""splitter""stack""statusbar""statusbarpanel""stringbundle""stringbundleset""stylesheet""tab""tabbox""tabbrowser""tabpanel""tabpanels""tabs""template""textbox""textnode""titlebar""toolbar""toolbarbutton""toolbargrippy""toolbaritem""toolbarpalette""toolbarseparator""toolbarset""toolbarspacer""toolbarspring""toolbox""tooltip""tree""treecell""treechildren""treecol""treecols""treeitem""treerow""treeseparator""triple""vbox""window""wizard""wizardpage"
no skipping, no summarising, we read the whole list together bestie π«Ά
π 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. ngl the reason is so real: currently, "template" is mapped to "xul_template" to avoid conflict with the "template" function exported by Template::Declare::Tags. lowkey genius π
β¨ AUTHOR β¨
Agent Zhang <agentzh@yahoo.cn> β thank you for your service, legend π
β¨ SEE ALSO β¨
Template::Declare::TagSetTemplate::Declare::TagSet::HTMLTemplate::Declare::TagsTemplate::Declare
go read those too, iykyk π¦
and that's the whole page, bestie π this one came from perl v5.34.0, dated 2022-06-17, and it's filed under Templa...t::XUL(3pm) β the truncated name is giving mystery, but the vibes? immaculate. periodt. π
β¨
π¦ 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