Welcome to WebmasterWorld Guest from 23.20.223.88

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

To embed or not?

What's the best way to embed Perl in HTML? Or should I not?

     
4:07 am on Jul 28, 2005 (gmt 0)

10+ Year Member



I want to create HTML pages with small chungs of Perl.

To me it seems easier to Write the HTML and embed the Perl where I need it. After looking on CPAn, there seems to be several modules that will do the job.

Are there some modules better than others?

OR

Should I not embed at all and just use the functions in the CGI module to generate my pages?

Thanks again
Clueless Custodian

4:22 am on Jul 28, 2005 (gmt 0)

5+ Year Member



One way is to enable SSI for your .html pages and call the .cgi as follows:

<!--#include virtual="/cgi-bin/randhtml.cgi" -->

5:10 am on Jul 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the chunks are really small I'd embed. HTML::Mason is very powerful and might be too much for something small, but I don't know your task. Amazon uses HTML::Mason. There is also Embperl which is lighter and might be better for something small.
2:42 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



Thanks Again Moltar -
I'm headed to CPAN to get another rollof ductape :)
2:47 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



HTML::Mason, Template::Toolkit, or HTML::Template will let you mix both. Mason is probably the better one if you want to mix Perl into HTML.

Sean

 

Featured Threads

Hot Threads This Week

Hot Threads This Month