I have a Perl module that represents a DCR as an object ($dcr). If I call a method on this object in a TPL as follows:
<iw_value name="${dcr}->virtualInclude( 'file' => '/en_US/enterprise/ssi/breadcrumbs.html', 'moderegex' => 'http|https' )" />
When I compile this TPL on the command line I get this:
Unquoted string "dcr" may clash with future reserved word at script.ipl line 634
This line contains something like:
iwpt_output( ${[iwpt_var_value(scalar({dcr}->virtualInclude( 'file' => '/en_US/enterprise/ssi/breadcrumbs.html', 'moderegex' => 'http|https' )))]}[0], "UTF-8" );
The $ on my {dcr} reference has been removed.
I have found that if I remove the .html from the include file reference, the $ is left as it was (but of course no such file exists).
<iw_value name="${dcr}->virtualInclude( 'file' => '/en_US/enterprise/ssi/breadcrumbs', 'moderegex' => 'http|https' )" />
iwpt_output( ${[iwpt_var_value(scalar(${dcr}->virtualInclude( 'file' => '/en_US/enterprise/ssi/breadcrumbs', 'moderegex' => 'http|https' )))]}[0], "UTF-8" );
What is causing this? It seems like the parser is doing something special with the .
Also if I define the file reference it as a variable it works.
<iw_perl>
my ${bread} = '/en_US/enterprise/ssi/breadcrumbs.html';
</iw_perl>
...
<iw_value name="$dcr->virtualInclude( 'file' => ${bread}, 'moderegex' => 'http|https' )" />
Edited by john on 10/28/03 06:39 AM (server time).