Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

template::declare::tagset(3pm) [debian man page]

Template::Declare::TagSet(3pm)				User Contributed Perl Documentation			    Template::Declare::TagSet(3pm)

NAME
Template::Declare::TagSet - Base class for tag sets used by Template::Declare::Tags SYNOPSIS
package My::TagSet; use base 'Template::Declare::TagSet'; # returns an array ref for the tag names sub get_tag_list { [ qw( html body tr td table base meta link hr )] } # prevents potential naming conflicts: sub get_alternate_spelling { my ($self, $tag) = @_; return 'row' if $tag eq 'tr'; return 'cell' if $tag eq 'td'; } # Specifies whether "<tag></tag>" can be # combined to "<tag />": sub can_combine_empty_tags { my ($self, $tag) = @_; $tag =~ /^ (?: base | meta | link | hr ) $/x; } DESCRIPTION
Template::Declare::TagSet is the base class for declaring packages of Template::Delcare tags. If you need to create new tags for use in your templates, this is the base class for you! Review the source code of Template::Declare::TagSet::HTML for a useful example. METHODS
new( PARAMS ) my $tag_set = Template::Declare::TagSet->new({ package => 'Foo::Bar', namespace => undef, }); Constructor created by "Class::Accessor::Fast", accepting an optional hash reference of parameters. get_tag_list my $list = $tag_set->get_tag_list(); Returns an array ref for the tag names offered by a tag set. get_alternate_spelling( TAG ) $bool = $obj->get_alternate_spelling($tag); Returns true if a tag has an alternative spelling. Basically it provides a way to work around naming conflicts. For example, the "tr" tag in HTML conflicts with Perl's "tr" operator, and the "template" tag in XUL conflicts with the "template" sub exported by "Template::Declare::Tags". can_combine_empty_tags( TAG ) $bool = $obj->can_combine_empty_tags($tag); Specifies whether "<tag></tag>" can be combined into a single token, "<tag />". By default, all tags can be combined into a single token; override in a subclass to change this value where appropriate. For example, "Template::Declare::TagSet::HTML->can_combine_empty_tags('img')" returns true since "<img src="..." />" is always required for HTML pages. "Template::Declare::TagSet::HTML->can_combine_empty_tags('script')", on the other hand, returns false, since some browsers can't handle a single script token. ACCESSORS
This class has two read-only accessors: package my $package = $obj->package(); Retrieves the value of the "package" option set via the constructor. namespace my $namespace = $obj->namespace(); Retrieves the value of the "namespace" option set via the constructor. AUTHOR
Agent Zhang <agentzh@yahoo.cn>. SEE ALSO
Template::Declare::TagSet::HTML, Template::Declare::TagSet::XUL, Template::Declare::Tags, Template::Declare. perl v5.10.1 2010-12-08 Template::Declare::TagSet(3pm)

Check Out this Related Man Page

Template::Manual(3)					User Contributed Perl Documentation				       Template::Manual(3)

NAME
Template::Manual - Template Toolkit User Manual Template Toolkit Manual The Template Toolkit manual contains documentation on using and extending the Template Toolkit. Template::Manual::Intro The Template::Manual::Intro page provides an introduction to the Template Toolkit Template::Manual::Syntax The Template::Manual::Syntax desribes the syntax and structure of templates and the directive tags embedded within them. Template::Manual::Directives The Template::Manual::Directives page lists all the Template Toolkit directives and gives examples of their use. Template::Manual::Variables The Template::Manual::Variables page describes the use of variables in templates. Template::Manual::VMethods The Template::Manual::VMethods page provides a full list of virtual methods that can be used in conjunction with variables, and gives examples of their use. Template::Manual::Config The Template::Manual::Config page describes all of the Template Toolkit configuration options. Template::Manual::Filters The Template::Manual::Filters page lists all of the Template Toolkit filters and gives examples of their use. Template::Manual::Plugins The Template::Manual::Plugins page lists all of the standard plugins distributed with Template Toolkit and gives examples of their use. Template::Manual::Internals The Template::Manual::Internals page describes the internal workings of the Template Toolkit. It is aimed at developers who wish to extend or modify the Template::Manual::Views The Template::Manual::Views page describes the experimental "VIEW" directive. Template::Manual::Credits The Template::Manual::Credits page lists the people who have contributed to the Template Toolkit. perl v5.16.3 2011-12-20 Template::Manual(3)
Man Page