
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Possible minor bug (?): '-' and $Scratch->{var-name}
Hi all -
Working on some code in an IC 4.6.5 catalog, I found that I could set and
view the contents of a scratch variable which contains a dash in its name
using IC tags:
[set var-name]something[/set]
[scratch var-name]
but operations failed within a Perl block:
[set var-name][/set]
[perl]
$Scratch->{var-name} = "foo";
return;
[/perl]
[scratch var-name]
In the latter example, var-name remains empty; no message in the error
log. Removing the dash from var-name fixes the problem instantly. It also
fixes the problem to enclose the var-name in single quotes:
[perl]
$Scratch->{'var-name'} = "foo";
return;
[/perl]
...and furthermore, using an underscore instead of a dash works. This is
pretty minor, but has me wondering; is this a side-effect of code intended
for other purposes or an undocumented character usage restriction?
- Ed L.
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users