4.3. ASP-Like Perl

Interchange supports an ASP-like syntax using the [mvasp] tag.

       This is HTML.<BR>

   <% HTML "This is code<BR>"; %>
       More HTML.<BR>
   <% $Document->write("Code again.<BR>") %>

If no closing [/mvasp] tag is present, the remainder of the page will also be seen as ASP.

ASP is simple. Anything between <% and %> is code, and the string %> can not occur anywhere inside. Anything not between those anchors is plain HTML that is placed unchanged on the page. Interchange variables, [L][/L] and [LC][/LC] areas will still be inserted, but any Interchange tags will not.

There is a shorthand <% = $foo %>, which is equivalent to <% $Document->write($foo); %> or <% HTML $foo; %>

       This is HTML.<BR>
       [value name] will show up as &#91;value name].<BR>

       &#95_VARIABLE__ value is equal to: __VARIABLE__

   <% = "This is code<BR>" %>

The __VARIABLE__ will be replaced by the value of Variable VARIABLE, but [value name] will be shown unchanged.

Important Note: If using the SQL::Statement module, the catalog must be set to AllowGlobal in interchange.cfg. It will not work in "Safe" mode due to the limitations of object creation in Safe. Also, the Safe::Hole module must be installed to have SQL databases work in Safe mode.