Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by blazar (Canon)
on Nov 21, 2006 at 10:38 UTC ( [id://585228]=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

if ($item eq "SELECT") { $tmpl = "select.tmpl"; } elsif ($item eq "CONTINUE") { $tmpl = "continue.tmpl"; } elsif ($item eq "DENIED"){ $tmpl = "denied.tmpl"; }

In which case (I know you're adapting the OP's code, but) one would probably use a hash instead, especially if other options were possibly to be added. But of course this is just a complete side note.

  • Comment on Re^2: HTML::Template : How to separate code and html with lesser maintenance issues
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://585228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-18 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found