Index  Up  <<  


ASP-like Perl

MiniVend supports an ASP-like syntax using the mvasp tag.

    [mvasp]
    <HTML><BODY> 
        This is HTML.<BR>

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

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

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

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

    [mvasp]
    <HTML><BODY> 
        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 you make use of the SQL::Statement module, your catalog must be set to AllowGlobal in minivend.cfg. It will not work in ``Safe'' mode due to limitations of object creation in Safe. Also, you must have the Safe::Hole module installed to have SQL databases work in Safe mode.


Index  Up  <<