[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] constant hash not session dependent and ic chat area?
Quoting 'Lawrence Dirienzo Jr' (LarryD@musicalheritage.org):
> October 15, 2002
>
> Hello icdevgroup.
>
> I want to define a hash variable as a constant that is not specific to a
> session that I will use for referencing constant values.
>
> Can I have this catalog level hash? What would the syntax look like if
> I were to put it in catalog.cfg, catalog_after or catalog_before.
>
There is a predefined Hash directive that you can use, also, which
just wants:
Hash foo bar
Available as $Config->{Hash}{foo}.
But you can also define as many as you want.
In interchange.cfg:
AddDirective MyConfigHash hash
Then in catalog.cfg:
MyConfigHash foo bar
MyConfigHash buz baz
At the end of all this, you have in $Vend::Cfg:
MyConfigHash => { foo => 'bar', buz => 'baz' },
And a calc or embedded Perl of
[calc] return $Config->{MyConfigHash}{foo} [/calc]
will return 'bar' to the page.
This is sketchily documented, now that I look at it.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
If you like what you're gettin', keep doin' what you're doin'. -- Hector