package Template::Declare::TagSet::XUL; use strict; use warnings; #use Smart::Comments; use base 'Template::Declare::TagSet'; our %AlternateSpelling = ( template => 'xul_tempalte', ); sub get_alternate_spelling { my ($self, $tag) = @_; $AlternateSpelling{$tag}; } sub get_tag_list { return [ qw{ 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 } ]; } 1; __END__ =head1 NAME Template::Declare::TagSet::XUL - Template::Declare tag set for XUL =head1 SYNOPSIS # 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' } } } }; # 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{