Next: Known problems Previous: Using document variables Contents: Contents |
Base data like the target language is provided by a global pseudo hash reference variable $main::PerlPoint
(which belongs to the usual namespace main::
of the Safe object, if used). Please see specific translator documentations for a list of passed data. By convention, this hash provides the target language and user settings at least:
// include the following to HTML documents only ? $PerlPoint->{targetLanguage} eq 'HTML' // include the following depending on command ? $PerlPoint->{userSettings}{special} |
There is also a less rough function interface to access these data:
// include the following depending on command ? flagSet('special') |
Active contents can modify the provided data but changes will expire when a code snippet is executed completely.
// active contents modifying base data \EMBED{lang=perl} $PerlPoint->{targetLanguage}='modified'; \END_EMBED // base data is automatically restored now, // so the condition checks the original value ? $PerlPoint->{targetLanguage} eq 'HTML' |
Next: Known problems Previous: Using document variables Contents: Contents |