GithubHelp home page GithubHelp logo

inish777 / dancer-template-tenjin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ido50/dancer-template-tenjin

0.0 1.0 0.0 114 KB

Tenjin wrapper for the Dancer Perl framework

Home Page: http://search.cpan.org/dist/Dancer-Template-Tenjin

Perl 100.00%

dancer-template-tenjin's Introduction

NAME
    Dancer::Template::Tenjin - Tenjin wrapper for Dancer

SYNOPSIS
            # in your config.yml
            template: "tenjin"

            # note: templates must use the '.tt' extension

DESCRIPTION
    This class is an interface between Dancer's template engine abstraction
    layer and the Tenjin module.

    Tenjin is a fast and feature-full templating engine that can be used by
    Dancer for production purposes. In comparison to Template::Toolkit, it
    is much more lightweight, has almost no dependencies, and supports
    embedded Perl code instead of defining its own language.

    In order to use this engine, you need to set your webapp's template
    engine in your app's configuration file (config.yml) like so:

            template: "tenjin"

    You can also directly set it in your app code with the set keyword.

    Now you can create Tenjin templates normally, but note that due to a
    Dancer restriction your template files must end in the '.tt' extension
    as Dancer automatically adds this extension to the template names you
    declare in your apps.

METHODS
  init()
    Initializes a template engine by generating a new instance of Tenjin.

  render( $template, $tokens )
    Receives a template name and a hash-ref of key-value pairs to pass to
    the template, and returns the template rendered by Tenjin.

SEE ALSO
    Dancer, Tenjin

AUTHOR
    Ido Perlmuter, "<ido at ido50 dot net>"

ACKNOWLEDGEMENTS
    *   Alexis Sukrieh, "<[email protected]>"

        Author of Dancer, who wrote Dancer::Template::Toolkit, on which this
        module is based.

    *   Sawyer X, "<xsawyerx at cpan.org>"

        Submitted helpful changes for version 0.3.

    *   Franck Cuny "<franck at lumberjaph dot net>"

        Submitted a simple test for version 0.4.

TODO
    * Non-file sources

      Find a way to allow using templates from other source, such as a
      database, just like in Catalyst::View::Tenjin.

    * Fine-tune Tenjin

      Allow passing arguments to Tenjin, such as USE_STRICT.

BUGS
    Please report any bugs or feature requests to
    "bug-dancer-template-tenjin at rt.cpan.org", or through the web
    interface at
    <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer-Template-Tenjin>.
    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 Dancer::Template::Tenjin

    You can also look for information at:

    *   RT: CPAN's request tracker

        <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dancer-Template-Tenjin>

    *   AnnoCPAN: Annotated CPAN documentation

        <http://annocpan.org/dist/Dancer-Template-Tenjin>

    *   CPAN Ratings

        <http://cpanratings.perl.org/d/Dancer-Template-Tenjin>

    *   Search CPAN

        <http://search.cpan.org/dist/Dancer-Template-Tenjin/>

LICENSE AND COPYRIGHT
    Copyright 2010 Ido Perlmuter.

    This program is free software; you can redistribute it and/or modify it
    under the terms of either: the GNU General Public License as published
    by the Free Software Foundation; or the Artistic License.

    See http://dev.perl.org/licenses/ for more information.

dancer-template-tenjin's People

Contributors

fcuny avatar ido50 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.