[interchange-bugs] [rt.icdevgroup.org #123] [Comment] Administration/Preferences operates on variable database only

Gert van der Spoel via RT interchange-comment at rt.icdevgroup.org
Fri Jul 17 16:18:02 UTC 2009


http://rt.icdevgroup.org/Ticket/Display.html?id=123
This is a comment.  It is not sent to the Requestor(s):

> > - Force VariableDatabase to be only 1 instance possible
> >
> > Why is it necessary to force VariableDatabase to only allow 1 table?
> > You
> > can accomplish your other wishes without removing that widely-used
> > behavior, can't you? You just have to make it clear that the admin
> > variable editing feature will only write to one table if more than
>    one
> > is
> > specified.

I've been looking at things a bit further and wonder who has created the VariableDatabase directive and with what initial purpose? 

If you have the following in your catalog.cfg:

VariableDatabase variable
VariableDatabase site

It will process both files, however:
$Config->{VariableDatabase} will hold the last value (site) only.

This makes me wonder if this Directive was intended to have multiple values. Also when you look at lib/Vend/Interpolate.pm in sub dynamic_var  you will find that it will do a : 
$Vend::VarDatabase = database_exists_ref($Vend::Cfg->{VariableDatabase} ...

In the above case this will catch 'site' but not variable ... 

Even though this only occurs when setting pragma dynamic_variables , I still would think this is unclear behavior and the documentation not clear as it states that this pragma is to be used in combination with VariableDatabase .. but aparently only when there is just one instance.

Anything you know about this Jon from the (g)olden years?

If it turns out that VariableDatabase was not intended to be more than 1 .. then I do think that enforcing that would only make things more consistent ... Or $Config->{VariableDatabase} to be turned into an array with all VariableDatabase entries ... I do not think there are many locations where the value is being used.








More information about the interchange-bugs mailing list