No need to send emails to both me and list
(twice) I guess ?
Anyway - I already looked into that. It's what
But it's not what I need/want.
That way I can only call some run_mode (method)
from current module (one that is outputing
the template in the first place). I would
need to manualy add plugins to each of the
(or just in base module).
On the other hand, I could write an method in my
base module (inherited by others). And implement
that logic inside of him (require SomeModule, call
some_run_mode in it ...).
But all that would be similar like
I was hopping to avoid that ... and make it
----- Original Message -----
Sent: Tuesday, November 08, 2005 11:33
Subject: RE: [htmltmpl] Writing an
extension for HTML::Template - how to do it?
Since you're using CGI::App, you should have a look at
CGI::Application::Plugin::AnyTemplate - which will allow you to call a run
mode with the H::T
<TMPL_VAR NAME="CGIAPP_embed('some_run_mode', 'param,
Don't know if it's just me or documentation of
HTML::Template::Extension isn't good. Eitherway, I can't figure out how to write an extenstion for it, that I need for
I work with CGI::Application, and I wan't to be
able to use (reusable) objects in my templates.
For instance :
My filter would find SomeName
module (Prefix such as MyApp::Plugin::SomeName) make an instance of it
and call method - say named run. And place returned value instead of this
Think of it as another template file that is
included but it has some processing ... That way I can create one
module/plugin and use it througth whole site/application.
If I don't figure this out soon - I will have
to give a shot to HTML::Template::Expr and register a function with it
(<tmpl_var name="plugin(SomeName, param1, param2)">).