4.47. mvasp
Executes the ASP-style perl code contained by the tag. The code will run under the restrictions of the Safe module. This is very similar to the [perl] tag, except that the standard '<%' and '%>' ASP delimiters allow you to mix HTML and perl code.
4.47.1. Summary
[mvasp tables] ASP here [/mvasp] [mvasp tables="db1 db2 ..." other_named_attributes] ASP here [/mvasp]
Parameters | Description | Default |
tables | Database tables to be made available to ASP Perl code | none |
table | Alias for tables | none |
Attributes | Default |
failure | none |
no_return | Always true |
subs | No |
arg="subs" | Same as subs |
global | No |
file | none |
interpolate | No |
reparse | No |
Other_Characteristics | |
Invalidates cache | Yes |
Has Subtags | <% and %> |
Container tag | Yes |
Nests | No |
Tag expansion example:
[mvasp tables="products" failure="ASP Broke <BR>"] <P>This is HTML</p> <% my $sku = $Values->{code}; %> <P>More HTML</p> <% my $result = "Looked up SKU $sku. It is a "; $result .= $Tag->data('products', 'description', $sku ); $Document->write( "$result <br>\n" ); %> <P>Still more HTML</p> [/mvasp] --- <P>This is HTML</p> <P>More HTML</p> Looked up SKU os28044. It is a Framing Hammer <br> <P>Still more HTML</p>
4.47.1.1. See Also
4.47.2. Description
Executes the ASP-style perl code contained by the tag. The code will run under the restrictions of the Safe module. This is very similar to the [perl no_return=1] tag, except that the standard '<%' and '%>' ASP delimiters allow you to mix HTML and perl code.
See the perl tag and ASP-Like Perl sections for more detail.
4.47.2.1. tables
Whitespace-separated list of database tables to make available within the ASP-Perl code. See perl tag.
4.47.2.2. failure
The value the tag should return in case the perl code fails the eval. See perl tag.
4.47.2.3. no_return
The return value of the perl code is always suppressed. If you want output from the ASP code sections, you must explicitly write it with the &HTML or $Document->write() functions.
You can also retrieve the return value of the perl code from the session hash via [data session mv_perl_result]. See perl tag.
4.47.2.4. subs
Enable GlobalSub routines (requires catalog directive AllowGlobal). See perl tag.
4.47.2.5. global
Turn off Safe protection (requires catalog directive AllowGlobal). See perl tag.
4.47.2.6. file
Prepend the contents of the specified file or FileDatabase entry to the perl code before eval'ing it. See perl tag.
4.47.2.7. Examples
See the ASP-Like Perl section of Interchange Programming.