pike.git / lib / modules / Local.pmod

version» Context lines:

pike.git/lib/modules/Local.pmod:1:   #pike __REAL_VERSION__    - // $Id: Local.pmod,v 1.7 2003/04/27 02:25:33 nilsson Exp $ + // $Id: Local.pmod,v 1.8 2006/11/04 19:06:48 nilsson Exp $      //! @[Local] gives a local module namespace used for locally   //! installed pike modules. Modules are searched for in   //! the directory @tt{pike_modules@} which can be located in   //! the user's home directory or profile directory, or in any   //! of the system directories @tt{/opt/share, /usr/local/share,   //! /opt@} or @tt{/usr/local/@}. The user's home directory is   //! determined by examining the environment variable HOME, and   //! if that fails the environment variable USERPROFILE. If the   //! environment variable PIKE_LOCAL_PATH is set, the paths specified
pike.git/lib/modules/Local.pmod:50:    }       return UNDEFINED;   }      array(string) _indices() {    array(string) tmp = ({ });    foreach(local_path,string lp)    tmp+=get_dir(lp);    return Array.uniq(map(glob("*.pike",tmp)+glob("*.pmod",tmp)+glob("*.so",tmp), -  lambda(string in){ if(glob("*.so",in)) return in[..sizeof(in)-4]; -  return in[..sizeof(in)-6]; })); +  lambda(string in){ if(glob("*.so",in)) return in[..<3]; +  return in[..<5]; }));   }      // _values intentionally not overloaded      static void create() {    string tmp;    local_path=({ });    // FIXME $prefix/pike_modules    // FIXME All this should be controllable from .pikerc, when such a file is implemented...    add_path("/usr/local/pike_modules");