NAME

Perlbug::Object::Template - Template class

DESCRIPTION

Applies a template to the data generated by Perlbug::Format.

Each user may apply a template to each object | type.

Defaults for a particular type of object (eg; mail, flag, ...) may be applied by enabling the type column instead of the object one.

For inherited methods, see Perlbug::Object

SYNOPSIS

use Perlbug::Object::Template;

my $o_template = Perlbug::Object:;Template->new();

print $o_template->read('7')->format('h');

print $o_template->object('bug')->read('19870502.007')->template('display', 'h');

ARGUMENTS

format

See Perlbug::Format

PLACEHOLDERS

Placeholders in templates look like this: <{datacol}> and <{rel_ids}> etc.

Example using bug object:

  Column names:

	bugid:   <{bugid}>
	created: <{created}>
	author:  <{sourceaddr}>
	subject: <{subject}>

  Relationships:

	message count(<{message_count}>)

	messageids: <{message_ids}>
	patch ids:  <{patch_ids}>
	admins:     <{user_names}>
	CC list:    <{address_names}>
	status:     <{status_names}>

METHODS

new

Create new Template object:

my $o_template = Perlbug::Object::Template->new();
_template

Return catchall object data laid out against format(a).

Long lines will be wrapped - if you want a better format, define a template :-)

my $str = $o_tmp->_template($h_data, $h_rels);

my $str = $o_tmp->_template($h_data, $h_rels, [$fmt, [$i_withhdr]]]);
template

Return object in template layout according to format(a).

See also _template()

my $str = $o_tmp->template($h_data, $h_rels);

my $str = $o_tmp->_template($h_data, $h_rels, [$fmt, [$i_withhdr]]);

AUTHOR

Richard Foley perlbug@rfi.net 2001

1 POD Error

The following errors were encountered while parsing the POD:

Around line 87:

=back without =over