Roxen.git / server / modules / scripting / perl.pike

version» Context lines:

Roxen.git/server/modules/scripting/perl.pike:1:   #include <module.h>   inherit "module";   inherit "roxenlib";      // Experimental Perl script and tag handler module.   // by Leif Stensson.      string cvs_version = -  "$Id: perl.pike,v 2.5 2000/08/22 17:53:03 leif Exp $"; +  "$Id: perl.pike,v 2.6 2000/08/22 22:38:30 leif Exp $";      constant module_type = MODULE_EXPERIMENTAL |    MODULE_FILE_EXTENSION | MODULE_PARSER;      constant module_name = "Perl support";   constant module_doc =    "EXPERIMENTAL MODULE! This module provides a faster way of running "    "Perl scripts with Roxen. "    "The module also optionally provides a &lt;perl&gt;..&lt;/perl&gt; "    "container to run Perl code from inside RXML pages.";
Roxen.git/server/modules/scripting/perl.pike:66:       defvar("bindir", "perl/bin", "Perl Helper Binaries", TYPE_DIR,    "Perl helper binaries directory.");       defvar("parallel", 2, "Parallel scripts", TYPE_MULTIPLE_INT,    "Number of scripts/tags that may be evaluated in parallel. Don't set "    "this higher than necessary, since it may cause the server to block. "    "The default for this setting is 2.",    ({ 1, 2, 3, 4, 5 }) );    - #if constant(system.getpwnam) + #if constant(getpwnam)    defvar("identity", "nobody:*", "Run Perl as...", TYPE_STRING,    "User and group to run Perl scripts and tags as. The default for "    "this option is `nobody:*'. Note that Roxen can't change user ID "    "unless it has sufficient permissions to do so. `*' means `use "    "same as Roxen'.");   #endif   }      string status()   { string s = "<b>Script calls</b>: " + script_calls + " <br />\n" +    "<b>Script errors</b>: " + script_errors + " <br />\n" +    "<b>Parsed tags</b>: " + parsed_tags + " <br />\n";    - #if constant(system.getpwnam) + #if constant(getpwnam)    if (handler_settings->set_uid)    s += sprintf("<b>Subprocess UID</b>: set uid=%O <br />\n",    handler_settings->set_uid);    else    s += "<b>Subprocess UID</b>: same as Roxen<br />\n";   #endif       s += "<b>Helper script</b>: ";    if (Stdio.File(QUERY(bindir)+"/perlrun", "r"))    s += "found: " + QUERY(bindir)+"/perlrun <br />\n";
Roxen.git/server/modules/scripting/perl.pike:110:   static object gethandler()   { return ExtScript.getscripthandler(QUERY(bindir)+"/perlrun",    QUERY(parallel), handler_settings);   }      static void fix_settings()   {    string u, g;    mapping s = ([ ]);    - #if constant(system.getpwnam) + #if constant(getpwnam)    if (sscanf(QUERY(identity), "%s:%s", u, g) == 2)    {    array ua = getpwnam(u), ga = getgrnam(g);       if (!ua) ua = getpwuid((int) u);    if (!ga) ga = getgrgid((int) g);       if (ua) s->set_uid = ua[2];    if (ga) s->set_gid = ga[2];    }