Victor M Elfimov > MojoX-Renderer-CTPP2 > MojoX::Renderer::CTPP2

Download:
MojoX-Renderer-CTPP2-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source  

NAME ^

MojoX::Renderer::CTPP2 - CTPP2 renderer for Mojo

SYNOPSIS ^

Add the handler:

    use MojoX::Renderer::CTPP2;

    sub startup {
       ...

       my $ctpp2 = MojoX::Renderer::CTPP2->build(
            mojo        => $self,
            COMPILE_DIR => '/tmp/ctpp',
            COMPILE_EXT => '.ctpp2'
            template_options =>
             { arg_stack_size => 1024,
               arg_stack_size => 2048
             }
       );

       $self->renderer->add_handler( ctpp2 => $ctpp2 );

       ...
    }

And then in the handler call render which will call the MojoX::Renderer::CTPP2 renderer.

   $c->render(foo => 653, bar => [qw(abc 7583 def)]);

METHODS ^

build

This method returns a handler for the Mojo renderer.

Supported parameters are:

mojo

new currently requires a mojo parameter pointing to the base class Mojo-object. (Need for initial path to compiled templates.)

COMPILE_DIR

Root of directory in which compiled template files should be written.

If not defined 'COMPILE_DIR' or 'COMPILE_EXT' params - template don't compile and save.

COMPILE_EXT

Filename extension for compiled template files (default - .ctpp2c).

template_options

A hash reference of options that are passed to CTPP2->new().

About path for compiled templates:

AUTHOR ^

Victor M Elfimov, (victor@sols.ru)

BUGS ^

Please report any bugs or feature requests to bug-mojox-renderer-ctpp2 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MojoX-Renderer-CTPP2. 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 MojoX::Renderer::CTPP2

You can also look for information at:

SEE ALSO ^

HTML::CTPP2(3)

COPYRIGHT & LICENSE ^

Copyright 2009 Victor M Elfimov

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