VOID
expressions return no value but are used to
perform other work. The
VOID PERL
expression uses Perl to manipulate the data.
The Perl code is contained in an
EXPRBODY
element. The Zinc Perl module provides
classes and methods for gaining access to and manipulating the current record.
Objects accessed from Perl are copies of the current data; changing the Perl objects has no effect on the current data until a function is called to explicitly copy the Perl objects back.
Oracle recommends that you perform record manipulation with the
PERL_MANIPULATOR
element rather than with the
EXPRESSION
and
RECORD_MANIPULATOR
elements. However, if you need to
access and modify dimension sources (such as a dimension adapter or dimension
server) you should still use expressions such as
DVAL PERL
. The Perl manipulator does not access
dimension sources.
See the
EXPRESSION
element for DTD and attribute information.
<EXPRESSION TYPE=”PROPERTY” NAME=”PERL”> <EXPRBODY> <![CDATA[ ### IF ITEM HAS "LPRINT" PROPERTY WITH VALUE OF "Y", ### REMOVE CURRENT "FORMAT" PROPERTY, ### AND CREATE NEW ONE WITH VALUE OF "LP" my @lprint = get_props_by_name("LPRINT"); my @format = get_props_by_name("FORMAT"); if (-1 != $#lprint) { my $large = ($lprint[0])->value(); if ($large =~ /Y/) { if (-1 != $#format) { remove_props("FORMAT"); } my $new_prop = new Zinc::PropVal("FORMAT", "LP"); add_props($new_prop); } } ]]> </EXPRBODY> </EXPRESSION>