[ANNOUNCE] Config::LDAP

2001-09-27 Thread James G Smith

The uploaded file

Config-LDAP-0.01.tar.gz

has entered CPAN as

file: $CPAN/authors/id/J/JS/JSMITH/Config-LDAP-0.01.tar.gz
size: 6725 bytes
 md5: aa8ba7d25e8e059fe9b71ddbdb668550

Nothing too mod_perly, but LDAP and websites do seem to go together at
times.

This module will try to read any RFC 2252-complient attribute type and
object class configuration file.  This can allow web scripts (for example)
to know what to expect before sending information to an LDAP server without
having to hard-code that information.

This is an initial release and should be considered alpha -- not fit for
production use.  Thought I'd let some others play around with it and let me
know what they would find useful in the interface. :)
--
James Smith [EMAIL PROTECTED], 979-862-3725
Texas AM CIS Operating Systems Group, Unix



RE: Backticks as fast as XS

2001-09-27 Thread Matt Sergeant

 -Original Message-
 From: Doug MacEachern [mailto:[EMAIL PROTECTED]]
 
 i'm guessing part of the difference in your code is due to 
 fprintf having
 a pre-allocated buffer, whereas the SV's SvPVX has not been 
 pre-allocated
 and gets realloc-ed each time you call sv_catpv.  have a look 
 at the code
 below, fprintf is faster than sv_catpvn, but if the SvPVX is 
 preallocated,
 sv_catpvn becomes faster than fprintf:
 
 timethese(1_000, {
 fprintf   = sub { TickTest::fprintf() },
 svcat = sub { TickTest::svcat() },
 svcat_pre = sub { TickTest::svcat_pre() },
 });
 
 Benchmark: timing 1000 iterations of fprintf, svcat, svcat_pre...
fprintf:  9 wallclock secs ( 8.72 usr +  0.00 sys =  8.72 
 CPU) @ 114.68/s (n=1000)
  svcat: 13 wallclock secs (12.82 usr +  0.00 sys = 12.82 
 CPU) @ 78.00/s (n=1000)
  svcat_pre:  2 wallclock secs ( 2.75 usr +  0.00 sys =  2.75 
 CPU) @ 363.64/s (n=1000)

Very interesting. I'll try that (I wish you'd been listening to clp.mod when
I posted - other perl gurus weren't much help).

Matt.

_
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.



Modules

2001-09-27 Thread Recendez, Ray

How do I check if StackedHandlers, MethodHandlers, Authen, and Authz are
compiled in?
Thanks,
Ray



[OT] clp.moderated, was- Re: Backticks as fast as XS

2001-09-27 Thread Joe Schaefer

Matt Sergeant [EMAIL PROTECTED] writes:

  -Original Message-
  From: Doug MacEachern [mailto:[EMAIL PROTECTED]]
  
  i'm guessing part of the difference in your code is due to 
  fprintf having a pre-allocated buffer, whereas the SV's SvPVX 
  has not been pre-allocated and gets realloc-ed each time you 
  call sv_catpv.  have a look at the code below, fprintf is faster 
  than sv_catpvn, but if the SvPVX is preallocated,
  sv_catpvn becomes faster than fprintf:
  
  timethese(1_000, {
  fprintf   = sub { TickTest::fprintf() },
  svcat = sub { TickTest::svcat() },
  svcat_pre = sub { TickTest::svcat_pre() },
  });
  
  Benchmark: timing 1000 iterations of fprintf, svcat, svcat_pre...
 fprintf:  9 wallclock secs ( 8.72 usr +  0.00 sys =  8.72 
  CPU) @ 114.68/s (n=1000)
   svcat: 13 wallclock secs (12.82 usr +  0.00 sys = 12.82 
  CPU) @ 78.00/s (n=1000)
   svcat_pre:  2 wallclock secs ( 2.75 usr +  0.00 sys =  2.75 
  CPU) @ 363.64/s (n=1000)
 
 Very interesting. I'll try that (I wish you'd been listening to clp.mod when
 I posted - other perl gurus weren't much help).
 
 Matt.

OT type=rant 
IMO clp.mod is a sinkhole for perl-related discussions, and like
Abigail[1], despite its noble intentions I think clp.mod fails to 
serve the Perl community in any useful way.  IME, this mailing list (and 
p5p when appropriate) is one of the best places to ask about perl 
performance-related issues (that aren't covered by Stas' guide, 
of course :).  You could also don the high rubber boots and try 
clp.misc, which IMO seems to be a bit improved since the creation 
of the beginners' [2] mailing lists.

[1]: (long, unwrapped url)
  
http://groups.google.com/groups?hl=engroup=comp.lang.perl.miscrnum=1selm=slrn820ckc.ls3.abigail%40alexandra.delanet.com

  Personally I had similar experiences with clp.moderated, 
  so I don't read it anymore either.

[2]: IIRC, they are at
  http://learn.perl.org/

 but I can't connect to it at the moment.

/OT

-- 
Joe Schaefer




Re: Restricting cpu time for mod_perl scripts? AND Reevaluating perl scripts under mod_perl.

2001-09-27 Thread Perrin Harkins

 I am currently using Apache::Resource to limit the maximum amount of ram
 the apache childs are allowed to use.

It would be better to use Apache::SizeLimit for that.  It's more flexible
and allows requests to complete before shutting down the process.
Apache::Resource is more useful as a safety measure to catch runaway
processes.

 However, I can't really use PERL_RLIMIT_CPU because it is kind of
pointless
 to kill every apache child that reaches
 this limit. I need a way to restrict cpu time on a per script or per run
 basis. But I am not sure if this is possible as
 far as I understand the mod_perl layout.
 Anybody did this? Or any suggestions?

That isn't possible without some modification to apache.  You would need to
be able to check the CPU consumed in some asynchronous way as the request
was processed, and there's no provision for that in the current apache
process model.

 My second problem is related to this one. How can I add perlcode via
 httpd.conf (PerlModule, ...) which is
 reevaluated at EVERY request?

All you need is a handler.  Every request can run as many handlers as you
configure in each stage.  If you're asking how to assign a handler globally
for every request, just use LocationMatch * or something similar.

 I am thinking about adding some own perl code
 which sets an alarm an
 checks every now an than how much cpu time the currently running perl
 script allready got

I don't think you can do that.  There are warnings in perlipc about how
having a complex alarm handler can cause segfaults.

Honestly, if all you're trying to do is keep coding mistakes from crashing
your server with a tight loop, just set some reasonable limit with
Apache::Resource.  When there's no problem, apache children don't generally
use much CPU at all.  That means runaways really stand out and use up their
allotted CPU limit quickly.

 Some other probleme here. How do I tell mod_perl to execute abc.pl inside
 the current scope but without
 saving the compiled code or any variables?

You can't.  You can remove the entries from the symbol table after running
it (see Apache::PerlRun for an exmaple), but why do you want to do this?  If
you're just trying to save RAM, load the script at startup.  If it's huge
and you don't usually need it, tell the current process to exit when it's
finished with this request.

- Perrin




Re: Modules

2001-09-27 Thread darren chamberlain

Recendez, Ray [EMAIL PROTECTED] said something to this effect on 09/27/2001:
 How do I check if StackedHandlers, MethodHandlers, Authen, and
 Authz are compiled in?

httpd -L | grep '^Perl'

(darren)

-- 
If NT is your answer, you don't understand the question.



ANNOUNCE: Apache::OpenIndex

2001-09-27 Thread George Sanderson

Apache::OpenIndex (OpenIndex-1.00.tar.gz) was uploaded to CPAN on 14Sep2001
and is currently released.  This was my first module.  I enjoyed journey.

OpenIndex provides a file manager for an Apache modperl web site using a
web browser.
It is a extensive rewrite of the Apache::AutoIndex module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. 
OpenIndex also provides the same functionality as autoindex, therefore it
can be used to both manage and navigate a web site.

A demo is available at:

http://www.xorgate.com/Apache/OpenIndex/demo

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: ANNOUNCE: Apache::OpenIndex

2001-09-27 Thread Wim Kerkhoff

Hmm,

Nice work!

George Sanderson wrote:
 
 Apache::OpenIndex (OpenIndex-1.00.tar.gz) was uploaded to CPAN on 14Sep2001
 and is currently released.  This was my first module.  I enjoyed journey.
 
 OpenIndex provides a file manager for an Apache modperl web site using a
 web browser.
 It is a extensive rewrite of the Apache::AutoIndex module (written by
 Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
 module.
 OpenIndex also provides the same functionality as autoindex, therefore it
 can be used to both manage and navigate a web site.



Re: ANNOUNCE: Apache::OpenIndex

2001-09-27 Thread Rasoul Hajikhani

George Sanderson wrote:
 
 Apache::OpenIndex (OpenIndex-1.00.tar.gz) was uploaded to CPAN on 14Sep2001
 and is currently released.  This was my first module.  I enjoyed journey.
 
 OpenIndex provides a file manager for an Apache modperl web site using a
 web browser.
 It is a extensive rewrite of the Apache::AutoIndex module (written by
 Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
 module.
 OpenIndex also provides the same functionality as autoindex, therefore it
 can be used to both manage and navigate a web site.
 
 A demo is available at:
 
 http://www.xorgate.com/Apache/OpenIndex/demo
 
 ++
 | George Sanderson [EMAIL PROTECTED]
 | http://www.xorgate.com
 ++
George,
I get a You don't have permission to access /Apache/OpenIndex/demo/ on
this server message.
-r



Re: ANNOUNCE: Apache::OpenIndex

2001-09-27 Thread Medi Montaseri


What is an application of such technologyI think Apache provides
such directory listing itself...but what can you do with this

I don't know what features your module has but if it can be trained to
read a configuration file (a manifest) per directory, then I can see
this technology being use for colaborative web sites, such as an internal
documentation area where people could drop things...and the manifest is
to insert access control and as well brief description of docs (sort of
a meta-directory)otherwise just getting a listing from the file system
and showing it is well...nice

I don't mean to depreciate your worksometimes I don't know how to
write..

On Thu, 27 Sep 2001, George Sanderson wrote:

 Apache::OpenIndex (OpenIndex-1.00.tar.gz) was uploaded to CPAN on 14Sep2001
 and is currently released.  This was my first module.  I enjoyed journey.
 
 OpenIndex provides a file manager for an Apache modperl web site using a
 web browser.
 It is a extensive rewrite of the Apache::AutoIndex module (written by
 Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
 module. 
 OpenIndex also provides the same functionality as autoindex, therefore it
 can be used to both manage and navigate a web site.
 
 A demo is available at:
 
 http://www.xorgate.com/Apache/OpenIndex/demo
 
 ++
 | George Sanderson [EMAIL PROTECTED]
 | http://www.xorgate.com
 ++
 
 

-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems EngineerHTTP://www.CyberShell.com
CyberShell Engineering
-




cvs commit: modperl-2.0/src/modules/perl modperl_cmd.h

2001-09-27 Thread dougm

dougm   01/09/27 08:28:51

  Modified:src/modules/perl modperl_cmd.h
  Log:
  add MP_CMD_{SRV,DIR}_FLAG macros
  
  Revision  ChangesPath
  1.7   +8 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_cmd.h 2001/09/06 06:00:08 1.6
  +++ modperl_cmd.h 2001/09/27 15:28:51 1.7
  @@ -42,6 +42,10 @@
   
   #endif
   
  +#define MP_CMD_SRV_FLAG(name, item, desc) \
  +AP_INIT_FLAG( name, modperl_cmd_##item, NULL, \
  +  RSRC_CONF, desc )
  +
   #define MP_CMD_SRV_TAKE1(name, item, desc) \
   AP_INIT_TAKE1( name, modperl_cmd_##item, NULL, \
 RSRC_CONF, desc )
  @@ -64,6 +68,10 @@
   
   #define MP_CMD_DIR_ITERATE(name, item, desc) \
   AP_INIT_ITERATE( name, modperl_cmd_##item, NULL, \
  +  OR_ALL, desc )
  +
  +#define MP_CMD_DIR_FLAG(name, item, desc) \
  +AP_INIT_FLAG( name, modperl_cmd_##item, NULL, \
 OR_ALL, desc )
   
   #endif /* MODPERL_CMD_H */
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_config.c modperl_env.c modperl_env.h modperl_options.c modperl_types.h

2001-09-27 Thread dougm

dougm   01/09/27 16:31:36

  Modified:src/modules/perl modperl_config.c modperl_env.c
modperl_env.h modperl_options.c modperl_types.h
  Log:
  whoops. only meant to commit mod_perl.c, backing out half-way finish changes that 
should not have been committed
  
  Revision  ChangesPath
  1.40  +2 -0  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- modperl_config.c  2001/09/27 23:29:51 1.39
  +++ modperl_config.c  2001/09/27 23:31:36 1.40
  @@ -9,6 +9,8 @@
   dcfg-interp_scope = MP_INTERP_SCOPE_UNDEF;
   #endif
   
  +MpDirSETUP_ENV_On(dcfg); /* %ENV setup on by default */
  +
   return dcfg;
   }
   
  
  
  
  1.7   +2 -5  modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_env.c 2001/09/27 23:29:51 1.6
  +++ modperl_env.c 2001/09/27 23:31:36 1.7
  @@ -36,7 +36,7 @@
   { NULL }
   };
   
  -void modperl_env_request_populate(pTHX_ request_rec *r)
  +static void modperl_env_request_populate(pTHX_ request_rec *r)
   {
   HV *hv = GvHV(PL_envgv);
   int i;
  @@ -102,14 +102,11 @@
   }
   #endif
   
  -#define MpDirSeenSETUP_ENV(dcfg) \
  -(dcfg-flags-opts_seen  MpDir_f_SETUP_ENV)
  -
   void modperl_env_request_tie(pTHX_ request_rec *r)
   {
   MP_dDCFG;
   
  -if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) {
  +if (MpDirSETUP_ENV(dcfg)) {
   modperl_env_request_populate(aTHX_ r);
   }
   
  
  
  
  1.3   +0 -3  modperl-2.0/src/modules/perl/modperl_env.h
  
  Index: modperl_env.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_env.h 2001/09/27 23:29:51 1.2
  +++ modperl_env.h 2001/09/27 23:31:36 1.3
  @@ -8,10 +8,7 @@
   #define modperl_env_tie(mg_flags) \
   SvFLAGS((SV*)GvHV(PL_envgv)) |= mg_flags
   
  -void modperl_env_request_populate(pTHX_ request_rec *r);
  -
   void modperl_env_request_tie(pTHX_ request_rec *r);
  -
   void modperl_env_request_untie(pTHX_ request_rec *r);
   
   #endif /* MODPERL_ENV_H */
  
  
  
  1.9   +0 -4  modperl-2.0/src/modules/perl/modperl_options.c
  
  Index: modperl_options.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_options.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_options.c 2001/09/27 23:29:51 1.8
  +++ modperl_options.c 2001/09/27 23:31:36 1.9
  @@ -82,8 +82,6 @@
   }
   #endif
   
  -o-opts_seen |= opt;
  -
   if (action == '-') {
   o-opts_remove |= opt;
   o-opts_add = ~opt;
  @@ -127,8 +125,6 @@
   conf-opts_add = add-opts_add;
   conf-opts_remove = add-opts_remove;
   }
  -
  -conf-opts_seen |= add-opts_seen;
   
   return conf;
   }
  
  
  
  1.49  +0 -1  modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- modperl_types.h   2001/09/27 23:29:51 1.48
  +++ modperl_types.h   2001/09/27 23:31:36 1.49
  @@ -98,7 +98,6 @@
   modperl_opts_t opts_add;
   modperl_opts_t opts_remove;
   modperl_opts_t opts_override;
  -modperl_opts_t opts_seen;
   int unset;
   } modperl_options_t;
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h

2001-09-27 Thread dougm

dougm   01/09/27 08:46:21

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
  Log:
  add PerlTaintCheck directive for backwards compat
  
  Revision  ChangesPath
  1.73  +2 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- mod_perl.c2001/09/27 15:26:36 1.72
  +++ mod_perl.c2001/09/27 15:46:21 1.73
  @@ -428,6 +428,8 @@
   #ifdef MP_COMPAT_1X
   MP_CMD_DIR_ITERATE(PerlHandler, response_handlers,
  Subroutine name),
  +MP_CMD_SRV_FLAG(PerlTaintCheck, taint_check,
  +Turn on -T switch),
   #endif
   MP_CMD_ENTRIES,
   { NULL }, 
  
  
  
  1.7   +14 -0 modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_cmd.c 2001/08/08 16:20:31 1.6
  +++ modperl_cmd.c 2001/09/27 15:46:21 1.7
  @@ -84,6 +84,20 @@
   return NULL;
   }
   
  +
  +#ifdef MP_COMPAT_1X
  +
  +MP_CMD_SRV_DECLARE_FLAG(taint_check)
  +{
  +if (on) {
  +return modperl_cmd_switches(parms, dummy, -T);
  +}
  +
  +return NULL;
  +}
  +
  +#endif /* MP_COMPAT_1X */
  +
   #ifdef USE_ITHREADS
   
   #define MP_INTERP_SCOPE_USAGE PerlInterpScope must be one of 
  
  
  
  1.9   +6 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_cmd.h 2001/09/27 15:39:57 1.8
  +++ modperl_cmd.h 2001/09/27 15:46:21 1.9
  @@ -23,6 +23,12 @@
   MP_CMD_SRV_DECLARE(requires);
   MP_CMD_SRV_DECLARE(options);
   
  +#ifdef MP_COMPAT_1X
  +
  +MP_CMD_SRV_DECLARE_FLAG(taint_check);
  +
  +#endif /* MP_COMPAT_1X */
  +
   #ifdef USE_ITHREADS
   MP_CMD_SRV_DECLARE(interp_start);
   MP_CMD_SRV_DECLARE(interp_max);
  
  
  



cvs commit: modperl-2.0/t/response/TestModules cgi.pm

2001-09-27 Thread dougm

dougm   01/09/27 08:50:37

  Modified:src/modules/perl modperl_cmd.c modperl_cmd.h
   t/response/TestModules cgi.pm
  Log:
  s/dummy/mconfig/g; s/on/flag_on/g
  
  Revision  ChangesPath
  1.8   +5 -5  modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_cmd.c 2001/09/27 15:46:21 1.7
  +++ modperl_cmd.c 2001/09/27 15:50:37 1.8
  @@ -63,7 +63,7 @@
   MP_CMD_SRV_DECLARE(options)
   {
   MP_dSCFG(parms-server);
  -modperl_config_dir_t *dcfg = (modperl_config_dir_t *)dummy;
  +modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig;
   int is_per_dir = parms-path ? 1 : 0;
   modperl_options_t *opts = is_per_dir ? dcfg-flags : scfg-flags;
   apr_pool_t *p = parms-pool;
  @@ -89,8 +89,8 @@
   
   MP_CMD_SRV_DECLARE_FLAG(taint_check)
   {
  -if (on) {
  -return modperl_cmd_switches(parms, dummy, -T);
  +if (flag_on) {
  +return modperl_cmd_switches(parms, mconfig, -T);
   }
   
   return NULL;
  @@ -117,7 +117,7 @@
   MP_CMD_SRV_DECLARE(interp_scope)
   {
   modperl_interp_scope_e *scope;
  -modperl_config_dir_t *dcfg = (modperl_config_dir_t *)dummy;
  +modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig;
   MP_dSCFG(parms-server);
   int is_per_dir = parms-path ? 1 : 0;
   
  @@ -154,7 +154,7 @@
   
   #define MP_CMD_INTERP_POOL_IMP(xitem) \
   const char *modperl_cmd_interp_##xitem(cmd_parms *parms, \
  -  void *dummy, const char *arg) \
  +  void *mconfig, const char *arg) \
   { \
   MP_dSCFG(parms-server); \
   int item = atoi(arg); \
  
  
  
  1.10  +3 -3  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_cmd.h 2001/09/27 15:46:21 1.9
  +++ modperl_cmd.h 2001/09/27 15:50:37 1.10
  @@ -7,15 +7,15 @@
   
   #define MP_CMD_SRV_DECLARE(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, const char *arg)
  +   void *mconfig, const char *arg)
   
   #define MP_CMD_SRV_DECLARE2(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, const char *arg1, const char *arg2)
  +   void *mconfig, const char *arg1, const char *arg2)
   
   #define MP_CMD_SRV_DECLARE_FLAG(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, int on)
  +   void *mconfig, int flag_on)
   
   MP_CMD_SRV_DECLARE(trace);
   MP_CMD_SRV_DECLARE(switches);
  
  
  
  1.6   +2 -0  modperl-2.0/t/response/TestModules/cgi.pm
  
  Index: cgi.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cgi.pm2001/06/27 05:36:52 1.5
  +++ cgi.pm2001/09/27 15:50:37 1.6
  @@ -9,6 +9,8 @@
   sub handler {
   my $r = shift;
   
  +system echo hi;
  +
   if ($CGI::Q) {
   die CGI.pm globals were not reset;
   }
  
  
  



cvs commit: modperl-2.0/t/response/TestModules cgi.pm

2001-09-27 Thread dougm

dougm   01/09/27 08:52:09

  Modified:t/response/TestModules cgi.pm
  Log:
  whoops; lame -T test was not supposed to be committed
  
  Revision  ChangesPath
  1.7   +0 -2  modperl-2.0/t/response/TestModules/cgi.pm
  
  Index: cgi.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- cgi.pm2001/09/27 15:50:37 1.6
  +++ cgi.pm2001/09/27 15:52:09 1.7
  @@ -9,8 +9,6 @@
   sub handler {
   my $r = shift;
   
  -system echo hi;
  -
   if ($CGI::Q) {
   die CGI.pm globals were not reset;
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache ParseSource.pm

2001-09-27 Thread stas

stas01/09/27 09:03:49

  Modified:lib/Apache ParseSource.pm
  Log:
  - add the apr_table constants
  
  Revision  ChangesPath
  1.29  +1 -0  modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ParseSource.pm2001/09/25 17:30:31 1.28
  +++ ParseSource.pm2001/09/27 16:03:49 1.29
  @@ -143,6 +143,7 @@
   log= [qw(APLOG_)],
   },
   APR = {
  +table = [qw{APR_OVERLAP_TABLES_}],
   poll  = [qw{APR_POLL}],
   common= [qw{APR_SUCCESS}],
   error = [qw{APR_E}],
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h modperl_types.h

2001-09-27 Thread dougm

dougm   01/09/27 12:04:39

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c mod_perl.h modperl_types.h
  Log:
  integrate modperl_perl_global module
  
  Revision  ChangesPath
  1.69  +1 -1  modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Code.pm   2001/09/20 06:07:48 1.68
  +++ Code.pm   2001/09/27 19:04:38 1.69
  @@ -525,7 +525,7 @@
   
   my @c_src_names = qw(interp tipool log config cmd options callback handler
gtop util io filter bucket mgv pcw global env cgi
  - perl);
  + perl perl_global);
   my @g_c_names = map { modperl_$_ } qw(hooks directives flags xsinit);
   my @c_names   = ('mod_perl', (map modperl_$_, @c_src_names));
   sub c_files { [map { $_.c } @c_names, @g_c_names] }
  
  
  
  1.75  +4 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- mod_perl.c2001/09/27 15:56:44 1.74
  +++ mod_perl.c2001/09/27 19:04:38 1.75
  @@ -510,6 +510,8 @@
   rcfg-wbucket.header_parse = 1;
   }
   
  +modperl_perl_global_save(aTHX_ rcfg-perl_globals);
  +
   h_stdout = modperl_io_tie_stdout(aTHX_ r);
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
  @@ -520,6 +522,8 @@
   modperl_io_handle_untie(aTHX_ h_stdin);
   
   modperl_env_request_untie(aTHX_ r);
  +
  +modperl_perl_global_restore(aTHX_ rcfg-perl_globals);
   
   #ifdef USE_ITHREADS
   if (MpInterpPUTBACK(interp)) {
  
  
  
  1.38  +1 -0  modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- mod_perl.h2001/09/27 15:26:36 1.37
  +++ mod_perl.h2001/09/27 19:04:38 1.38
  @@ -12,6 +12,7 @@
   
   #include modperl_flags.h
   #include modperl_hooks.h
  +#include modperl_perl_global.h
   
   #ifdef MP_USE_GTOP
   #include modperl_gtop.h
  
  
  
  1.47  +1 -0  modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- modperl_types.h   2001/08/30 05:15:51 1.46
  +++ modperl_types.h   2001/09/27 19:04:38 1.47
  @@ -205,6 +205,7 @@
   modperl_wbucket_t wbucket;
   MpAV *handlers_per_dir[MP_HANDLER_NUM_PER_DIR];
   MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV];
  +modperl_perl_globals_t perl_globals;
   #ifdef USE_ITHREADS
   modperl_interp_t *interp;
   #endif
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h

2001-09-27 Thread dougm

dougm   01/09/27 12:35:34

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
  Log:
  add PerlSendHeader directive for backwards compat
  
  Revision  ChangesPath
  1.76  +2 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- mod_perl.c2001/09/27 19:04:38 1.75
  +++ mod_perl.c2001/09/27 19:35:34 1.76
  @@ -426,6 +426,8 @@
Scope of a Perl interpreter),
   #endif
   #ifdef MP_COMPAT_1X
  +MP_CMD_DIR_FLAG(PerlSendHeader, send_header,
  +Tell mod_perl to scan output for HTTP headers),
   MP_CMD_DIR_ITERATE(PerlHandler, response_handlers,
  Subroutine name),
   MP_CMD_SRV_FLAG(PerlTaintCheck, taint_check,
  
  
  
  1.10  +6 -0  modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_cmd.c 2001/09/27 15:56:44 1.9
  +++ modperl_cmd.c 2001/09/27 19:35:34 1.10
  @@ -105,6 +105,12 @@
   return NULL;
   }
   
  +MP_CMD_SRV_DECLARE_FLAG(send_header)
  +{
  +char *arg = flag_on ? +ParseHeaders : -ParseHeaders;
  +return modperl_cmd_options(parms, mconfig, arg);
  +}
  +
   #endif /* MP_COMPAT_1X */
   
   #ifdef USE_ITHREADS
  
  
  
  1.12  +1 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- modperl_cmd.h 2001/09/27 15:56:44 1.11
  +++ modperl_cmd.h 2001/09/27 19:35:34 1.12
  @@ -27,6 +27,7 @@
   
   MP_CMD_SRV_DECLARE_FLAG(taint_check);
   MP_CMD_SRV_DECLARE_FLAG(warn);
  +MP_CMD_SRV_DECLARE_FLAG(send_header);
   
   #endif /* MP_COMPAT_1X */