HTML::Merge - Embedded HTML/SQL/Perl system by Raz Information Systems.
-----------------------------------------------------------------------
Copyright (c) 1999 - 2004 Raz Information Systems Ltd.
http://www.raz.co.il/

This package is distributed under the same terms as Perl itself, see the
Artistic License on Perl's home page.
-----------------------------------------------------------------------
			OVERVIEW				24/11/2004
						Current version: 3.45

What is HTML::Merge ?

Merge is an embedded HTML/Perl/SQL tool used to create dynamic web content.
All Merge pages are referred to from web by URL: 
cgi-bin-dir/merge.pl?template=file.html 

If you use CGI mode you can define merge.pl as an handler with the Action directive in Apache. Using merge.pl under Apache::Registry will utilize Perl's built-in caching to cache pages using the do command. Merge uses a configuration file to retrieve information about database connectivity and debugging. It has an embedded debugging tool and on-line configuration. To turn that option on, set DEVELOPMENT to 1 in the configuration file. Don't forget to set it off before deployment. Alternate configuration files can appear in /etc/merge.conf and $HOME/.merge.

Why we created HTML::Merge ?

We needed a tool to facilitate development of web applications and we wanted that non Perl programmers (or having just minimal knowledge) could participate in developing complex data base intensive web application in business application development environment.
 
So why we decided to write own tool ?  
Well we have total control, we know how it works, we can have all the features we need and we didn't find other Perl based embedded scripting tool that gave us the features we needed ease of use and simple yet flexible data base integration.

HTML::Merge features

   1. Easy SQL data base integration.
   2. Embedded Perl - integrated with HTML and Javascript. 
   3. Developers tools including on line control and logging.
   4. Built in User and Security management.
   5. Persistent data and session management.
   6. Simple flow control.
   7. Email sending capabilities.
   8. Extensible - offers API for adding your own tags to HTML::Merge.


What is HTML::Merge instance ?

mergecreateinstance assists users setting HTML::Merge instance. The instance is an application or set of applications running under the same merge default settings (stored in merge.conf) and the same base URL (web directory).
Instance has its templates directory which are compiled to generate Perl CGI programs. The Perl programs generated by HTML::Merge are stored in the instance's cache directory.   

HTML::Merge toolbox
 
HTML::Merge has a web based developer's toolbox for viewing logs and debugging, configuring and security.

HTML::Merge template Syntax

Templte code Example:

<HTML>
 	<$RQ.'SELECT * FROM customers WHERE customer_id=<$RVAR.cust_id>'>
 	<$RLOOP>
  		<$RSQL.name> owes <$RSQL.debt><BR>
	</$RLOOP>
	<A HREF="/cgi-bin/merge.pl?template=main_menu.html">
</HTML>

Merge tag syntax is based upon the the following structure:
open tag: <$R[ [Engine name] ].[Tag name][. / =] .... >
close tag: </$R[ [Engine name] ].[Tag name]>

HTML::Merge extensions 

Extension files are created per instance, as a file called merge.ext, residing in the instance directory, or per server, in the file /etc/merge.ext.

for more info consult HTML::Merge:Ext man page.

HTML::Merge Future

	Handle Unicode on Templates and database 
	Release of HTML::Merge Applications.



More template code samples:

Loop example:
---------------------------------------------------------------
<html>
<head>
        <title>Loop example</title>
</head>

<body>
<br>
<$RCOUNT.i=1:10>
        <$RCOUNT.j=1:10>
                <$RSET.number=' <$RVAR.i> * <$RVAR.j> '>                          
                <$RIF.' <$RVAR.number> < 10 '>
                        0<$RVAR.number>
                <$RELSE>
                        <$RVAR.number>
                <$REND_IF>
        </$RCOUNT>
        <br>
</$RCOUNT>
</body>
</html>
---------------------------------------------------------------

Date example:
---------------------------------------------------------------
<HTML>
<TITLE>Date example</TITLE>
Today is <$RDATE>.<BR>
<$RSET.tomorrow='<$RADDDATE.'<$RDATE>','1','0','0'>'>
Tomorrow is <$RVAR.tomorrow><BR>
</HTML>
---------------------------------------------------------------
