Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Disillusionment

by moxliukas (Curate)
on Jun 05, 2003 at 00:33 UTC ( #263201=note: print w/ replies, xml ) Need Help??

in reply to Disillusionment

OK, I am coming from a PHP background (I can already hear mumblings around ;)) and find (or any other HTML done in a similar way for that matter) unintuitive and ugly. Whenever I am doing some web-work I use templates for HTML. That way you can have a very clean hand-crafted HTML and no ugly print statements. Most of the time only a few things on a page are generated dynamicly, so it is very easy to use things like this:

use HTML::Template; # ... first send header, update counters, whatever ... # then comes HTML rendering phase: my $template = HTML::Template->new('template.html'); # set some parameter $template->param('counter', $counter); # print it all print $template->output();

It really separates all the business logic from display, so you can concentrate on interface with databse or whatever while leaving the HTML for a template. Well, at least I like it ;)

Comment on Re: Disillusionment
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2015-11-28 01:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (737 votes), past polls