Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.113 2001/06/17 20:07:09 nilsson Exp $ + // $Id: module.pike,v 1.114 2001/06/28 19:14:12 mast Exp $      #include <module_constants.h>   #include <module.h>   #include <request_trace.h>      constant __pragma_save_parent__ = 1;      inherit "basic_defvar";   mapping(string:array(int)) error_log=([]);   
Roxen.git/server/base_server/module.pike:35:    */   void report_fatal( mixed ... args ) { predef::report_fatal( @args ); }   void report_error( mixed ... args ) { predef::report_error( @args ); }   void report_notice( mixed ... args ) { predef::report_notice( @args ); }   void report_debug( mixed ... args ) { predef::report_debug( @args ); }         string module_identifier()   {    if (!_module_identifier) { + #if 1 +  string cname = my_configuration()->name; +  string mname = my_configuration()->otomod[this_object()]; +  if (!cname || !mname) +  error ("Called too early; module identifier not known yet.\n"); +  _module_identifier = cname + "/" + mname; + #else    string|mapping name = this_object()->register_module()[1];    if (mappingp (name)) name = name->standard;    string cname = sprintf ("%O", my_configuration());    if (sscanf (cname, "Configuration(%s", cname) == 1 &&    sizeof (cname) && cname[-1] == ')')    cname = cname[..sizeof (cname) - 2];    _module_identifier = sprintf ("%s,%s",    name||this_object()->module_name, cname); -  + #endif    }    return _module_identifier;   }      string _sprintf()   { -  return "RoxenModule(" + -  (Roxen.get_modname (this_object()) || module_identifier()) + ")"; +  return "RoxenModule(" + module_identifier() + ")";   }      array register_module()   {    return ({    this_object()->module_type,    this_object()->module_name,    this_object()->module_doc,    0,    module_unique,
Roxen.git/server/base_server/module.pike:90:   {    modules = map (modules,    lambda (string modname) {    sscanf ((modname / "/")[-1], "%[^#]", modname);    return modname;    });    Configuration conf = configuration || my_configuration();    if (!conf)    report_warning ("Configuration not resolved; module(s) %s that %s "    "depend on weren't added.", String.implode_nicely (modules), -  Roxen.get_modname (this_object()) || module_identifier()); +  module_identifier());    else    conf->add_modules( modules, now );    return 1;   }      string file_name_and_stuff()   {    return ("<b>Loaded from:</b> "+(roxen->filename(this_object()))+"<br>"+    (this_object()->cvs_version?    "<b>CVS Version: </b>"+