Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: html template in a perl script

by bradcathey (Prior)
on Sep 21, 2003 at 13:18 UTC ( #292983=note: print w/ replies, xml ) Need Help??


in reply to Re: html template in a perl script
in thread html template in a perl script

cees , can you provide anymore info on the DATA method? I use HTML::Template, but sometimes it's overkill. It sounds like this might be simpler/faster/easier.

Thanks.


Comment on Re: Re: html template in a perl script
3Re: html template in a perl script
by jeffa (Chancellor) on Sep 21, 2003 at 15:56 UTC
    Um, the DATA method is what we are talking about! You just put your template in the DATA section of your Perl script. I use this all the time for simple CGI scripts and examples i post here at the Monastery - but for anything serious, i use another file for the template. As for your overkill problem, the more you use HTML::Template the less the overkill seems to be a problem.

    As for your problem at Re: html template in a perl script, have you looked into Template yet? Kake Pugh has an excellent article over at perl.com: How to Avoid Writing Code that demonstrates how well that Class::DBI works with Template Toolkit.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Re: Re: html template in a perl script
by cees (Curate) on Sep 21, 2003 at 16:08 UTC

    If you read the original question again, you will see what the DATA method that I am talking about refers to. It is a method for adding a __DATA__ section to your perl code, where perl will automatically provide this data in the file handle DATA. The above question gives an example of how to use this using HTML::Template.

    For more info, check out perldoc SelfLoader for some more info on __DATA__.

    - Cees

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-08-21 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls