NAME

Template::Plugin::Transformator - TemplateToolkit plugin for Net::NodeTransformator

VERSION

version 0.001

SYNOPSIS

    [% USE Transformator %]
    
    [% FILTER Transformator 'jade' %]
    
    span
		| Hi!
    
    [% END %]

DESCRIPTION

This module is a filter for Net::NodeTransformator.

CONFIGURATION

Template->new({
	PLUGIN_CONFIG => {
		Transformator => {
			connect => 'hostname:port'
		}
	}
});

USAGE EXAMPLES

  • Generic object, name engine each invocation

    [% USE Transformator %]
    [% FILTER Transformator 'engine_name' %]
    	Lorem Ipsum
    [% END %]
  • Specialized object, engine named as construction argument

    [% USE some_engine = Transformator 'engine_name' %]
    [% FILTER $some_engine %]
    	Dolorem Sit Amet
    [% END %]
  • Specialized object, using configuration override

    [% USE other_transformator = Transformator connect = 'some.other.hostname' %]
    [% FILTER $other_transformator 'engine_name' %]
    [% END %]
  • Specialized object, using configuration override with engine name

    [% USE special_transformator = Transformator
           connect = 'some.other.hostname'
    	   engine = 'engine_name'
    %]
    [% FILTER $special_transformator %]
    [% END %]
  • Parameterized engine invocation

    [% USE Transformator %]
    [% FILTER Transformator 'jade', name = 'Peter' %]
    | Hi #{name}!
    [% END %]
    
    [% vars = { name = 'Peter' } %]
    [% FILTER Transformator 'jade', vars %]
    | Hi #{name}!
    [% END %]
    
    [% USE jade = Transformator 'jade' %]
    [% FILTER $jade name = 'Peter' %]
    | Hi #{name}!
    [% END %]
    
    [% FILTER $jade vars %]
    | Hi #{name}!
    [% END %]

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/zurborg/libtemplate-plugin-transformator-perl/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

David Zurborg <zurborg@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by David Zurborg.

This is free software, licensed under:

The ISC License