Mark Overmeer > HTML-FromMail > HTML::FromMail::Format

Download:
HTML-FromMail-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.11   Source  

NAME ^

HTML::FromMail::Format - base-class for message formatters

INHERITANCE ^

 HTML::FromMail::Format
   is a Mail::Reporter

 HTML::FromMail::Format is extended by
   HTML::FromMail::Format::Magic
   HTML::FromMail::Format::OODoc

SYNOPSIS ^

 my $fmt  = HTML::FromMail::Format::Magic->new(...);

 my $make = HTML::FromMail->new
  ( templates => ...
  , formatter => 'Magic'
 #, formatter => 'HTML::FromMail::Format::Magic'
 #, formatter => $fmt
  );

DESCRIPTION ^

The formatter is implementing the template system: it formats the output. This base class defines the methods which must be provided by any extension.

At the moment, the following template systems are available:

METHODS ^

$obj->containerText(ARGS)

Produces the text encapsulated between begin and end tag of this template block. If the tag is "stand alone", not a container, the value of undef is returned. When the container is "empty", an (optionally empty) string with white-spaces is returned.

$obj->lookup(TAG, ARGS)

Lookup the value for a certain TAG. This TAG may, but also may not, be derived from the template. The value is lookup is the data produced by the various producer methods, implemented in HTML::FromMail::Page extensions. The values are administered by the various formatters, because there meaning (and for instance their scoping) is formatter dependent. Values which are looked-up are often not simple strings.

HTML::FromMail::Format->new(OPTIONS)

$obj->onFinalToken(ARGS)

Returns whether the parser has more data in this particular part of the template.

$obj->processText(TEXT, ARGS)

New TEXT is supplied, which can be seen as part of the currently active container.

SEE ALSO ^

This module is part of HTML-FromMail distribution version 0.11, built on June 08, 2007. Website: http://perl.overmeer.net/html-from-mail/

LICENSE ^

Copyrights 2003,2004,2007 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

syntax highlighting: