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. + // Perl script and tag handler module.   // by Leif Stensson.      string cvs_version = -  "$Id: perl.pike,v 2.15 2000/11/09 18:19:11 kuntri Exp $"; +  "$Id: perl.pike,v 2.16 2000/12/18 14:08:40 leif Exp $";    - constant module_type = MODULE_EXPERIMENTAL | -  MODULE_FILE_EXTENSION | MODULE_TAG; + constant module_type = MODULE_FILE_EXTENSION | MODULE_TAG;      constant module_name = "Perl support";   constant module_doc = -  "EXPERIMENTAL MODULE! This module provides a faster way of running " -  "Perl scripts with Roxen. " +  "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.";      static string recent_error = 0;   static int parsed_tags = 0, script_calls = 0, script_errors = 0;      static mapping handler_settings = ([ ]);      constant thread_safe = 1;   
Roxen.git/server/modules/scripting/perl.pike:57:    "before returning it to the client. HTTP is the traditional CGI "    "output style, where the script is responsible for producing the "    "HTTP headers before the document, as well as the main document "    "data.",    ({ "HTML", "RXML", "HTTP" })    );       defvar("rxmltag", 0, "RXML-parse tag results", TYPE_FLAG,    "Allow RXML parsing of tag results.");    -  defvar("bindir", "perl/bin", "Perl Helper Binaries", TYPE_DIR, -  "Perl helper binaries directory."); +  defvar("helper", + #if constant(system.NetWkstaUserEnum) +  // NT +  "perl/bin/ntperl", + #else +  // Assume Unix +  "perl/bin/perlrun", + #endif +  "Perl Helper", TYPE_DIR, +  "Path to the Perl helper program used to start Perl subprocesses.");       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(getpwnam)    defvar("identity", "nobody:*", "Run Perl as...", TYPE_STRING,    "User and group to run Perl scripts and tags as. The default for "
Roxen.git/server/modules/scripting/perl.pike:89: Inside #if constant(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"; +  if (Stdio.File(QUERY(helper), "r")) +  s += "found: " + QUERY(helper)+" <br />\n";    else    s += "not found.<br />\n";       if (recent_error)    s += "<b>Most recent error</b>: " + recent_error + " <br />\n";       return s;   }      static object gethandler() - { return ExtScript.getscripthandler(QUERY(bindir)+"/perlrun", + { return ExtScript.getscripthandler(QUERY(helper),    QUERY(parallel), handler_settings);   }      static void fix_settings()   {    string u, g;    mapping s = ([ ]);      #if constant(getpwnam)    if (sscanf(QUERY(identity), "%s:%s", u, g) == 2)