Branch: Tag:

2021-04-07

2021-04-07 14:45:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

basic_defvar: Set the path for variables automatically.

Call set_path() in all variables defined via defvar().
set_path() was documented as being called from the configuration
interface, but no such code actually existed.

The path used for set_path() is derived from module_identifier()
and the variable name.

Adds module_identifier() to all places that use basic_defvar that
did not already have it.

Fixes [REP-111].

5:   // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.658 2008/10/12 22:14:03 mast Exp $"; + constant cvs_version = "$Id$";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
180:   inherit Configuration;   inherit "basic_defvar";    + string module_identifier() + { +  return name + "/_config"; + } +    protected mapping(RequestID:mapping) current_connections =    set_weak_flag( ([ ]), 1 );