
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Scratch and session variables
On Sat, Oct 06, 2001 at 02:57:44PM +0200, Steffen Dettmer wrote:
> Hi,
>
> just a quick question. In the docs is mentioned, scratch
> variables are maintained in the user session. Additionally, there
> are session variables. Well, and the session can be accessed
> similar like a database table via [data]. Can I imagine (all) scratch
> variables like a value of a (single) session attribute? I mean:
>
> session { username => steffen,
> scratch => { mv_something => value, x => y },
> other => value };
It is a hash of various elements. There is a [dump] tag somewhere
around that dumps it.
>
> Otherwise I cannot understand why it's necessary to have both
> session and scratch variables...
Various parts of it are available in different ways. $Vend::Session->{values}
can be manipulated directly by form input. Other objects, like
@{$Vend::Session->{carts}{$cart}} are inaccessible except through
ic processes. Scratch and some other hashes are aggregates that are
passed through Safe, usually as "flattened" attributes, eg you can get all
the scratch space, or all the values, etc... but I don't believe there is a
standard tag to pass the whole session through Safe. (Someone correct me if
that is wrong.) Think of it as partitioning and shorthand. All of these
are clumped into session hash because that how ic saves state call to call.
Most people don't go at it in raw perl, but with tags, so the underlying
architecture of session is usually both hidden and simplified.
cfm
>
> oki,
>
> Steffen
>
> --
> Dieses Schreiben wurde maschinell erstellt,
> es tr?gt daher weder Unterschrift noch Siegel.
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
--
Christopher F. Miller, Publisher cfm@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
1.207.657.5078 http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users