[interchange-cvs] CVS notice: activity by heins

interchange-cvs@lists.akopia.com interchange-cvs@lists.akopia.com
Wed, 18 Apr 2001 01:40 -0500

CVS activity by user 'heins':
interchange/lib/Vend Config.pm,, Data.pm,, Interpolate.pm,,
Update of /anon_cvs/repository/interchange/lib/Vend
In directory www.akopia.com:/tmp/cvs-serv18290

Modified Files:
      Tag: DEV_4_7_0
	Config.pm Data.pm Interpolate.pm 
Log Message:

New dynamic variable setup encompasses three things:

	1. New "DirConfig" directive that allows you to batch-set a bunch
	of variables from files. The syntax:

		DirConfig  <directive-name>  <directory-glob>

	<directive-name> is usually "Variable", but could be any hash-based
	directive. (No other standard directives currently make sense to set this

	<directory-glob> is a filespec that could encompass multiple directories.
	Files are ignored.

	The directories are read for file *names* that contain only word characters,
	i.e. something that would be a valid Variable. (This alone might make
	it not suitable for other uses, but picking up the junk from the
	in-directory-backup-file people would be intolerable.)

	Then the contents of the file is used to set the variable of the 
	file name.

	The source file name is kept in $Vend::Cfg->{DirConfig}{Variable}{VARNAME},
	for use if dynamic_variables Pragma is set.

	2. Pragma dynamic_variables enables dynamic updating of variables
	from files...

	If enabled, all @_VARIABLE_@ and __VARIABLE__ settings are checked
	first to see if the source file is defined. If there is a key 
	present, even if its contents are blank, it is returned. Example: in
	the case of this catalog.cfg entry:
		DirConfig   Variable   templates/foundation/regions

	If the file NOLEFT_TOP is present at catalog config time, __VARIABLE__ will
	equal [include templates/foundation/regions/NOLEFT_TOP].

	3. ...as well as database. The file takes precedence, but if
	VariableDatabase is configured and there is a record existant
	with the key equal to the VARIABLE name, then it will be used.

This is probably very confusing, but will be necessary for the new template
manager I am working on. I can think of quite a few other uses as well....