in reply to Re: HTML::Template : How to separate code and html with lesser maintenance issues
in thread HTML::Template : How to separate code and html with lesser maintenance issues

$tmpl->param($_    => $b() );
what's this? this gives me a syntax error. do you wanted to use a subroutine-reference instead? like main->can($b)?

Replies are listed 'Best First'.
Re^3: HTML::Template : How to separate code and html with lesser maintenance issues
by jbrugger (Parson) on Nov 21, 2006 at 12:48 UTC
    hmm, yes, it's just an example i stripped from my own code, where i use <TMPL_VAR NAME="function_module_functionname">. there i do the following:
    eval("require $module"); $mod = $module->new(); $tmpl->param($_ => $mod->$function())
    But i see you got the idea :)
    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.