Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: HTML::Template : How to separate code and html with lesser maintenance issues

by tinita (Parson)
on Nov 21, 2006 at 12:25 UTC ( #585245=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://585245]
help
Chatterbox?
[marto]: this is the wrong part of the conversation to come back to the chatterbox to find I think :P

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-04-26 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?