Template::Nes::Inject - Include Nes templates in Template Toolkit.
my $top_template = Template::Nes::Inject->new({ template => 'template.nhtml', nes_top_dir => '/full/path/to/cgi-bin/nes' }); my $vars = { title => "Test" }; $top_template->process($vars); $top_template->out();
Allows the inclusion of Templates, Objects, Plugins, configuration files and generally, many features of Nes in Template Toolkit templates.
Not a Plugin, can mix Nes Tags and TT Directives in the templates:
<html> <head> <title>[% title %]</title> </head> <body> {: # include by TT :} <p>[% INCLUDE head.nhtml %]</p> {: # include by Nes :} <p>{: include footer.nhtml :}</p> </body> </html>
Include Nes Templates, PHP, PYTHON and others live sample:
L<http://nes.sourceforge.net/hello_nes/tests-tt/index.cgi?action=Inludes>
Include Nes Objects live sample:
L<http://nes.sourceforge.net/hello_nes/tests-tt/index.cgi?action=Objects>
Nes Tags and Debug Info live sample:
L<http://nes.sourceforge.net/hello_nes/tests-tt/index.cgi?action=others>
Sample to use Nes; http://nes.sourceforge.net/, Nes, Nes::Tutorial, Nes::nes.cfg
Skriptke
Version 0.01
Copyright (c) Enrique F. Castanon Barbero. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms and conditions as GNU Public License (GPL).
This means that you can, at your option, redistribute it and/or modify it under either the terms the GNU Public License (GPL), or under the Perl Artistic License.
See http://dev.perl.org/licenses/
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Use of this software in any way or in any form, source or binary, is not allowed in any country which prohibits disclaimers of any implied warranties of merchantability or fitness for a particular purpose or any disclaimers of a similar nature.
IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
To install Template::Nes::Inject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Nes::Inject
CPAN shell
perl -MCPAN -e shell install Template::Nes::Inject
For more information on module installation, please visit the detailed CPAN module installation guide.