MojoX::Renderer::CTPP2 - CTPP2 renderer for Mojo
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)]);
This method returns a handler for the Mojo renderer.
Supported parameters are:
new currently requires a mojo parameter pointing to the base class Mojo-object. (Need for initial path to compiled templates.)
new
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.
Filename extension for compiled template files (default - .ctpp2c).
A hash reference of options that are passed to CTPP2->new().
If mojo and COMPILE_DIR are defined:
COMPILE_DIR is absolute path - use this absolute path (ex.: mojo project root path - '/mojo', COMPILE_DIR - '/c_tmpl', path for compiled templates - '/c_tmpl')
COMPILE_DIR is relative path - use relative path into mojo root directory (ex.: mojo project root path - '/mojo', COMPILE_DIR - 'tmp/c_tmpl', path for compiled templates - '/mojo/tmp/c_tmpl')
If mojo defined and COMPILE_DIR not defined:
use relative path 'tmp/ctpp2' into mojo root directory (ex.: mojo project root path - '/mojo', path for compiled templates - '/mojo/tmp/ctpp2')
If mojo not defined and COMPILE_DIR are defined:
COMPILE_DIR is absolute path - use this absolute path (COMPILE_DIR - '/c_tmpl', path for compiled templates - '/c_tmpl')
COMPILE_DIR is relative path - use relative path into File::Spec->tmpdir function directory (ex.: system temporary path - '/tmp', COMPILE_DIR - 'c_tmpl', path for compiled templates - '/tmp/c_tmpl')
File::Spec->tmpdir
Both parameters mojo and COMPILE_DIR not defined:
use relative path 'ctpp2' into File::Spec->tmpdir function directory (ex.: system temporary path - '/tmp', path for compiled templates - '/tmp/ctpp2')
Victor M Elfimov, (victor@sols.ru)
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.
bug-mojox-renderer-ctpp2 at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc MojoX::Renderer::CTPP2
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=MojoX-Renderer-CTPP2
CPAN Ratings
http://cpanratings.perl.org/d/MojoX-Renderer-CTPP2
Search CPAN
http://search.cpan.org/dist/MojoX-Renderer-CTPP2/
HTML::CTPP2(3)
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.
To install MojoX::Renderer::CTPP2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Renderer::CTPP2
CPAN shell
perl -MCPAN -e shell install MojoX::Renderer::CTPP2
For more information on module installation, please visit the detailed CPAN module installation guide.