#3 HTML::Template::Expr register_function

open
nobody
None
5
2003-02-03
2003-02-03
Anonymous
No

This module is great.

However there is one thing we would like it to also do.
Take the following for example:

<!-- TMPL_VAR EXPR="function('test')" -->

The above function can accept the string 'test' and
pass it to the function we have set with the
register_function subroutine we want. But we cannot
generate any variables to be placed inside the above
tag to be set at run-time, like:

<!-- TMPL_VAR EXPR="function('<!-- TMPL_VAR NAME=test
-->')" -->

Since the whole process will be in memory, is there a
way to register the subroutines in such a way that we
could call them with refs to our variables? Something
like:

HTML::Template::Expr->register_function(function =>
\&mysub($Var));

This addition would take the module to a whole new
level of flexibility.
This way, the subs that are registered with the
Template::Expr object have access to more than just
static variables passed from the template itself.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks