Hello!

I want to create TT plugin, which will produce some output during
it's usage - from it's 'new' method, at the moment when [% USE
MyPlugin %] directive is executed.

In TT internals USE directive is converted to $stash->set call, so
normally no output may be produced. I examined Template::Context
module and found out, that calling 'process' method with coderef
instead of block name should invoke this code execution, with
return value added to the output. So I tried to put
$context->process( sub { 'my text' } ); into 'new' method of my
plugin. But it does not work - no output is produced.

So I'm asking for TT guru's advice - is this trick possible
anyway?


-- 
Sergey Martynoff


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to