HTML::Merge - Embedded HTML/SQL/Perl system by Raz Information Systems.
-----------------------------------------------------------------------
Copyright (c) 1999, 2000, 2001, 2002 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				13/09/2002
						Current version: 3.36

What is HTML::Merge ?

Merge is an embedded HTML/Perl/SQL tool used to create dynamic web content. All Merge pages are referred to by cgi-bin-dir/merge.pl?template=file.html although on 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 HTML::Merge ?

We needed a RAD tool for developing web applications and we wanted that non Perl oriented employees could help in the development efforts. 
So why we wrote our own tool ?  
Well we have total control, we know how it works, it have all the features we need and there is no other Perl based embedded scripting tool that we know of that gives all of HTML::Merge features.

HTML::Merge projects

This is the self promoting part so I'll be brief. HTML::Merge is currently being used by 5 of our clients on 8 different projects.

HTML::Merge features

   1.  SQL direct connectivity.
   2.  Embedded Perl. 
   3. 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.


HTML::Merge instance

HTML::Merge has a set environment that is called an instance.
every instance reside in a web directory configured for him. every instance is a world which consists of a separate configuration file,  caching, template system database (if requested) and so forth. to create an instance merge comes with the Unix only mergecreateinstance program.

HTML::Merge toolbox
 
HTML::Merge has an on line toolbox for helping the developer control real time logging and debugging, configuring and security.

HTML::Merge Syntax

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 site, 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.

HTML::Merge Future

	Standardize the syntax.
	Use of a private database - SQLite.
	Release of HTML::Merge Applications.
	Merge Debugger.



Examples

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>
---------------------------------------------------------------
