[ic] Re: creating a temporary page variable

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Fri Aug 30 10:32:02 2002


Quoting Ed LaFrance (edl@newmediaems.com):
> At 03:49 AM 8/30/2002 -0400, you wrote:
> >Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> > > mike@perusion.com writes:
> > >
> > > > All variables in IC, except for ones stored in the user session,
> > > > last only for that page. Even if you set $Config, which you actually
> > > > see quite frequently, it will return to the catalog.cfg value on
> > > > the next access.
> > >
> > > The grand exception is $Variable, where changes are persistent even
> > > across sessions, so if you change a variable for one customer, the
> > > next will get the changed value in another session.
> >
> >Only if you change the file or data object underlying it, and that
> >is presuming you have "Pragma dynamic_variables" set.
> >
> >Just assigning to $Variable in embedded Perl will do nothing....
> >
> 
> Really splitting hairs now, but I've found that, even without the 
> above-mentioned Pragma directive, catalog Variables can be reassigned in an 
> Autoload routine, provided that they were intially set in catalog.cfg with 
> Variable directives, as opposed to being set from a VariableDatabase read. 
> Make sense?
> 

Yes, you can always assign to $Config and $Variable and have it persist
throughout the page transaction. However, just like a Bozo doll, it will
pop back up and go back to the configured value on the next page access.
Again, noting the exception that with "Pragma dynamic_variables" you can
change the file or data item that is the source of that Variable and
see a lasting change....

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry