Templa...t::XUL(3pm)

πŸ“¦
version 0.47 Β· 2 versions
  • 0.47 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.47 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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::TagSet
  • Template::Declare::TagSet::HTML
  • Template::Declare::Tags
  • Template::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