Jesse Vincent > Template-Declare > Template::Declare::TagSet::XUL

Download:
Template-Declare-0.37.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  3
View/Report Bugs
Source   Latest Release: Template-Declare-0.46

NAME ^

Template::Declare::TagSet::XUL - Tag set for XUL

SYNOPSIS ^

    use Template::Declare::TagSet::XUL;
    my $tagset = Template::Declare::TagSet::XUL->new(
        namespace => undef, package => 'self');
    my $list = $tagset->get_tag_list();
    print "@$list";

    my $altern = $tagset->get_alternate_spelling('template');
    if ( defined $altern ) {
        print $altern;
    }

    if ( $tagset->can_combine_empty_tags('button') ) {
        print "<button label='OK' />";
    }

    # normal use
    package MyApp::Templates;
    use Template::Declare::Tags qw/ XUL /;
    use base 'Template::Declare';
    # ...

INHERITANCE ^

   Template::Declare::TagSet::XUL
        isa Template::Declare::TagSet

METHODS ^

$obj = Template::Declare::TagSet::XUL->new({ namespace => $XML_namespace, package => $Perl_package })

Constructor inherited from Template::Declare::TagSet.

$list = $obj->get_tag_list()

Returns an array ref for the tag names.

The tag list was extracted from http://www.xulplanet.com/references/elemref/refall_elemref.xml (only <element name='...'> were recognized).

$bool = $obj->get_alternate_spelling($tag)

Returns the alternative spelling for a given tag if any or undef otherwise. Currently, template is mapped to xul_template because there is already a template sub exported by Template::Declare::Tags.

$bool = $obj->can_combine_empty_tags($tag)

Always returns true (inherited directly from the base class, Template::Declare::TagSet.

AUTHOR ^

Agent Zhang <agentzh@yahoo.cn>

SEE ALSO ^

Template::Declare::TagSet, Template::Declare::TagSet::HTML, Template::Declare::Tags, Template::Declare.

syntax highlighting: