Takuya Ichikawa > TRD-Velocity > TRD::Velocity

Download:
TRD-Velocity-0.0.7.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.0.7   Source  

NAME ^

TRD::Velocity - Template engine

VERSION ^

Version 0.0.7

SYNOPSIS ^

    use TRD::Velocity;

    $velo = new TRD::Velocity;
    $velo->setTemplateFile( 'foo.html' );
    $velo->set( 'name', 'value' );
    $html_stmt = $velo->marge();
    $ct = length( $html_stmt );
    print "Content-Type: text/html\n";
    print "Content-Length: ${ct}\n";
    print "\n";
    print $html_stmt;

EXPORT ^

A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module.

FUNCTIONS ^

new

    new Constructor.

    my $velo = new TRD::Velocity;

set( <name>, <value> )

    set parameter.

    $velo->set( 'itemname', 'Apple' );

setTemplateFile( <TemplateFileName> )

    set Template file.

    $velo->setTemplateFile( './template/soldmail.txt' );

setTemplateData( <TemplateData> )

    set Template data.

    my $template =<<EOT;
    Sender: ${sender}
    Email: ${email}
    EOT
    $velo->setTemplateData( $template );

marge

    Marge template to parameters.

    my $doc = $velo->marge();

tag_handler

    private function.

if_sub

    private function.

foreach_sub

    private function.

get_end

    private function.

marge_val

    private function.

dump

   Dump parameters.

AUTHOR ^

Takuya Ichikawa, <trd.ichi at gmail.com>

BUGS ^

Please report any bugs or feature requests to bug-trd-velocity at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TRD-Velocity. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc TRD::Velocity

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2008 Takuya Ichikawa, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.