Skip to main content
Embedding Perl with HTML::EP

At various times in my short programming carreer, I have programmed in ASP, JSP, PHP and Perl. The first 3 of those languages had nice features which would allow dropping language code into HTML documents. So if I needed some small pieces of dynamic information such as a date or a name to go into an otherwise largely static HTML document I could encapsulate the code in certain tags, submit it to the webserver and have it return the static + dynamic information. There was minimal performance effect and as a programmer I had freedom to choose where to place the code for extracting the dynamic output.

Until now however, I never did this in Perl/CGI. Whenever I needed dynamic information in Perl I would have to write a script for it. This was a huge waste for such HTML output-pages which were for the most part static. I had to write a script and print all of the static content in one or more print statements.

Apparently Perl language add-ons/modules have been available which allow embedding Perl into HTML pages for quite some time. I discovered one such today - the HTML::EP module. This allows special tags for letting the server know how they should be handled (ex. pass on to Apache mod-perl).

More documentation about HTML::EP at http://cpan.uwinnipeg.ca/htdocs/HTML-EP/

A nice feature HTML::EP has is the concept of multiple tag types which cater to special functions such as for example sending email.

<ep-mail subject="Howdy!" from="joe@ispsoft.de" to="joe@ispsoft.de">
Hello, Bill, old chap. How are you?

Yours sincerely,
John
</ep-mail>

I think this construction is superior to the other languages such as JSP, PHP or ASP as it allows for purpose specific calls, rather than having a single call for all purposes.

Comments

This is a superb post Embedding Perl with HTML::EP. I benefit from the knowledge lot. I will bookmark this page. show gratitude’s for sharing this information.

Popular posts from this blog

Paypal's Ridiculous Business Practices

In Q3-2005 we discovered the power of online sales and started to market Wapsol's products extensively online. Just as importantly we decided to get into the trading business for WLAN accessories (antennae, cable, connectors etc) which entails buying from manufacturers and selling on online-retail. Needless to say ebay's 26 worldwide markets were lucrative points of sales.

We used Paypal for collecting most of payments from customers outside Germany. The numbers ticked up fast and we were hecticly building up infrastructure for shipping, online-support, product-portfolio and payment-systems.

One morning as I woke up in Germany I found that Paypal decided to lock up our account without any specific reason. There were no disputes or complaints from buyers or anything that suggested provocation. They just locked it. In it a few thousands of dollars of cash-flow and the account was listed as a favored payment option for some 100 pending auctions - now customers couldn't pay for …

The Dream of the Information Age

If this beauty of a device meets it's mission of being owned by every kid on the planet, we are looking to a new dimension of the Information Age.
For full profile of the device, visit BBC's technology page.

SnagIT Problem Solved! (Hangs for minutes)

Here's the solution to the SnagIT sluggishness (hangs for several minutes)
I would try first turning off the magnifier window under tools > program preferences > program options. Uncheck the box to show magnifier windows. Click apply > ok and then try the capture again.Check your security software and make sure that Snagit is set as a safe application. A security program that consistently scans the process will cause a very slow response like you are seeing.Please also check your printers per this article:Answer Title: Slow SnagIt startupAnswer Link: http://techsmith.custhelp.com/cgi-bin/techsmith.cfg/php/enduser/std_adp.php?p_faqid=742Finally, please review the steps here and try these as well:Answer Title: SnagIt crashes or hangs when launchedAnswer Link: http://techsmith.custhelp.com/cgi-bin/techsmith.cfg/php/enduser/std_adp.php?p_faqid=137Let me know what happens.