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 blazar (Canon)
on Nov 21, 2006 at 10:38 UTC ( #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? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2021-11-27 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?