Quoting Ton Verhagen (suppressed):
> Dear All,
>
> I noticed the following 'weird' behavior of the if tag.
>
> Examine the following code:
>
> [tmp test_value]00000036[/tmp]
>
> [if type=explicit condition="[scratch test_value]"]
> Value is: [scratch test_value]
> [else]
> No value
> [/else]
> [/if]
>
> Result:
> Value is: 00000036
>
> So far so good.
>
> Now set the tmp to another (special ?) value:
>
> [tmp test_value]00000159[/tmp]
> ..... if-code as above
>
>
> Result:
> No value
>
>
> When I change the above code to the following, everything works as expected.
>
> [if type=explicit condition="[scratch test_value]"]
> [condition]
> return 1 if $Scratch->{test_value};
> return 0;
> [/condition]
> Value is: [scratch test_value]
> [else]
> No value
> [/else]
> [/if]
>
>
> This behavior can be duplicated in the online demo (test code in admin
> section)
>
> Any ideas?
Explicit is intended to have valid code as it's test, and a literal like
that has undetermined behavior when interpreted as Perl code.
Why you would do that instead of:
[if scratch test_value]
foo
[/if]
???
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <suppressed>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.