dynamic_variables_file_only — dynamically update configuration directives from files only
If this pragma is set, it prevents opening of Interchange databases in search for dynamic content of the directives, so that only files are checked.
It only makes sense to use this in combination with the
dynamic_variables pragma, and
DirConfig and VariableDatabase directives,
so check their reference pages for more information.
Example: Enable dynamic_variables_file_only pragma catalog-wide
Put the following in your catalog.cfg:
Pragma dynamic_variables Pragma dynamic_variables_file_only
dynamic_variables_file_only is available in Interchange versions:
4.8.0-5.7.0 (cvs-head)
Interchange 5.7.0 (1/1 contexts shown):
Source: lib/Vend/Interpolate.pm (rev. 2.308 from Mon Sep 22 00:01:19 2008)
Line 583 (context shows lines 573-587 in dynamic_var():575)
}
sub dynamic_var {
my $varname = shift;
return readfile($Vend::Cfg->{DirConfig}{Variable}{$varname})
if $Vend::Cfg->{DirConfig}
and defined $Vend::Cfg->{DirConfig}{Variable}{$varname};
VARDB: {
last VARDB if $::Pragma->{dynamic_variables_file_only};
last VARDB unless $Vend::Cfg->{VariableDatabase};
if($Vend::VarDatabase) {
last VARDB unless $Vend::VarDatabase->record_exists($varname);
return $Vend::VarDatabase->field($varname, 'Variable');