Content-type: text/html Compileperl Tag

Home
WebGroove is no longer supported. These docs are reference only.


Compileperl Tag
Like the Agent, the Compiler can be greatly extended with embedded Perl code. This tag makes it possible.

Example
<macro nav_hilite width=32 height=32 single>
<undef {enable}>
<compileperl>
my ($i) = lc($Token{"{current}"});
$Token{"{enable}"} = "true" if ($i eq $Token{"{section}"});
</compileperl>

<ifdef {enable}><a href="{url}">
<img src="{src}" width={width} height={height} border=0>
<ifdef {enable}></a>
</macro>


Kludge Notice
This tag can be very, very hard to use. The Perl print function prints to the compile results only! To place results in your current output file, you must use the internal function wgprint() instead. To access (or set) token values, use the hash $Token, such as $Token{'token_name'}. Within a macro definition, the macro attributes can be accessed as tokens with the name '{attrib_name}', such as $Token{'{color}'}. In general, if you don't know any Perl yet, don't bother with this tag.

Up To
Compiler Tags
Complete Tag Reference


WebGroove® is a registered trademark of Creativision Publishing Corporation