[OT] do { local *FH; }

2001-03-15 Thread Matt Sergeant

On Wed, 14 Mar 2001, Paul wrote:

 Learned a new trick:
  my $fh = do { local *FH; };

I've had trouble using this under mod_perl - bizarre results with it not
actually being lexical and not closing the file. I had to resort to using
Apache-gensym in the end. Has anyone else seen the same?

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Malcolm Beattie

Paul writes:
 
 --- Brian Ingerson [EMAIL PROTECTED] wrote:
  Garrett Goebel wrote:
   
   From: Paul [mailto:[EMAIL PROTECTED]]
   
Anybody know offhand *why* my() lexicals are supposedly faster?
 
 
 
  Yes this is OT, but I'll contribute to the problem as well...
  
  My coworker Gisle Aas (maybe you've heard of him ;) says that globals
  and lexicals have identical speed because Perl optimizes out the
  symbol-table lookup.
  
  Trust Gisle.
 
 lol -- now *there's* an answer.
 So for my details I should go to the parse tree docs, and the code, I'm
 thinking.
 
 BTW -- with many thanks to everyone -- my question was "why are they
 faster", but the reason was never the speed -- it was to understand the
 way Perl stores and *accesses* lexicals.
 
 Any input? =o)

If you have a reasonably recent Perl, you can do the following:

% perl -MO=Terse,exec -e '$f = 123'
OP (0x8180688) enter
COP (0x8180628) nextstate
SVOP (0x8175298) const  IV (0x80f8770) 123
SVOP (0x817b488) gvsv  GV (0x81017b0) *f
BINOP (0x8180600) sassign
LISTOP (0x8180660) leave

% perl -MO=Terse,exec -e 'my $f = 123'
OP (0x81805d0) enter
COP (0x8180598) nextstate
SVOP (0x8104b88) const  IV (0x8104c9c) 123
OP (0x817b490) padsv [1]
BINOP (0x81761f0) sassign
LISTOP (0x81752a0) leave

As you can see from the output, for a non-lexical $f, Perl uses an
opcode "gvsv GV *f". The gvsv instruction gets a pointer to the
entire glob (*f) from which it dereferences the SV (scalar) part and
pushes it on the stack. See pp_hot.c:

PP(pp_gvsv)
{
djSP;
EXTEND(SP,1);
if (PL_op-op_private  OPpLVAL_INTRO)
PUSHs(save_scalar(cGVOP_gv));
else
PUSHs(GvSV(cGVOP_gv));
RETURN;
}

For the lexical, Perl has already determined at compile time that
$f is in pad slot number 1 (think stack or register allocation).
padsv is:

PP(pp_padsv)
{
djSP; dTARGET;
XPUSHs(TARG);
...

If you navigate all the macros, you'll find that takes curpad
(a pointer to an array of SV pointers: the current "stack frame"
where "stack" is in the sense of a traditional compiler, not the
(main) Perl stack) and pushes curpad[1] (remember $f was allocated
slot 1 at compile time) onto the (main Perl) stack.

--Malcolm

-- 
Malcolm Beattie [EMAIL PROTECTED]
Unix Systems Programmer
Oxford University Computing Services



Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Alexander Farber (EED)

Paul wrote:
 --- Robert Landrum [EMAIL PROTECTED] wrote:
  I could be wrong, but as I recall, when your program enters a scope,
  perl immediatly identifies the the scratchpad to use.  Then, it need
  only search backwards up the tree of scratchpads to find the variable
  "$x", which is faster than iterating through the STHASH looking for a
  localized or global $x.
 
 But how does it locate x in the scratchpad? Where're the docs?
 Or am I gonna have to read the code? =lol!

Chapter 20 in "Advanced Perl programming"



%ENV

2001-03-15 Thread Gene Dascher

Is the ENV hash sanitized and repopulated between the time the Perl*Auth
handlers are run and the requested cgi is executed?  I am setting an ENV key
in one of my handlers that I'd like to use in a cgi that resides in a
protected directory.  Is it possible to retain that variable throughout the
entire process, or will it always get wiped out?

Example:
I use my browser to call a cgi that is in a protected directory.  In the
PerlAuthenHandler, I set $ENV{'TEST_VAR'} = 1.  I can pull the value of
$ENV{'TEST_VAR'} in the PerlAuthzHandler, but when I try and fetch the value
in the cgi that I called, the key 'TEST_VAR' does not exist.

Thanks,

Gene Dascher




Re: %ENV

2001-03-15 Thread darren chamberlain

Gene Dascher ([EMAIL PROTECTED]) said something to this effect on 03/15/2001:
 Is the ENV hash sanitized and repopulated between the time the Perl*Auth
 handlers are run and the requested cgi is executed?  I am setting an ENV key
 in one of my handlers that I'd like to use in a cgi that resides in a
 protected directory.  Is it possible to retain that variable throughout the
 entire process, or will it always get wiped out?
 
 Example:
 I use my browser to call a cgi that is in a protected directory.  In the
 PerlAuthenHandler, I set $ENV{'TEST_VAR'} = 1.  I can pull the value of
 $ENV{'TEST_VAR'} in the PerlAuthzHandler, but when I try and fetch the value
 in the cgi that I called, the key 'TEST_VAR' does not exist.

Try fiddling with $r-subprocess_env; I've had good results that way. e.g.:

$r-subprocess_env('TEST_VAR', 1);

I haven't tried using %ENV, but I was under the impression it was
tied to the same internal Apache::Table object as
$r-subprocess_env, which means that setting $ENV{'TEST_VAR'}
should work as well.

Make sure you are setting this in the parent request, if you are
in a subrequest:

$r = ($r-is_main) ? $r : $r-main;

(darren)
-- 
The world is coming to an end!  Repent and return those library books!



RE: %ENV

2001-03-15 Thread Gene Dascher

Well, with the subprocess_env(), I can see the key that I set in my cgi now,
but the value that I set the key to is a Hash reference that I need to use
in my cgi.  Unfortunately, all I get now is ENV{'TEST_VAR'} =
HASH(0x860a278), and I can't pull my values out.

Thanks for the help; it looks like we are headed in the right direction.
Now, is there any way to set an ENV key to a hash or hash reference and use
that later on in a cgi program?

Thanks,

Gene

-Original Message-
From: darren chamberlain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 6:19 AM
To: modperl
Subject: Re: %ENV


Gene Dascher ([EMAIL PROTECTED]) said something to this effect on
03/15/2001:
 Is the ENV hash sanitized and repopulated between the time the Perl*Auth
 handlers are run and the requested cgi is executed?  I am setting an ENV
key
 in one of my handlers that I'd like to use in a cgi that resides in a
 protected directory.  Is it possible to retain that variable throughout
the
 entire process, or will it always get wiped out?

 Example:
 I use my browser to call a cgi that is in a protected directory.  In the
 PerlAuthenHandler, I set $ENV{'TEST_VAR'} = 1.  I can pull the value of
 $ENV{'TEST_VAR'} in the PerlAuthzHandler, but when I try and fetch the
value
 in the cgi that I called, the key 'TEST_VAR' does not exist.

Try fiddling with $r-subprocess_env; I've had good results that way. e.g.:

$r-subprocess_env('TEST_VAR', 1);

I haven't tried using %ENV, but I was under the impression it was
tied to the same internal Apache::Table object as
$r-subprocess_env, which means that setting $ENV{'TEST_VAR'}
should work as well.

Make sure you are setting this in the parent request, if you are
in a subrequest:

$r = ($r-is_main) ? $r : $r-main;

(darren)
--
The world is coming to an end!  Repent and return those library books!




RE: %ENV

2001-03-15 Thread Geoffrey Young



 -Original Message-
 From: darren chamberlain [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 7:19 AM
 To: modperl
 Subject: Re: %ENV
 
 
[snip]
 
 Try fiddling with $r-subprocess_env; I've had good results 
 that way. e.g.:
 
 $r-subprocess_env('TEST_VAR', 1);
 
 I haven't tried using %ENV, but I was under the impression it was
 tied to the same internal Apache::Table object as
 $r-subprocess_env,

I don't think that is right, since that would mean that you could do
case-insensitive lookups on %ENV...
  #!/usr/bin/perl

  my $r = shift;

  $ENV{Foo} = 'Foo';
  $r-subprocess_env(Bar = 'Bar');

  my $env_foo = $ENV{Foo};
  my $env_bar = $ENV{BAR};

  my $sp_foo = $r-subprocess_env('FOO');
  my $sp_bar = $r-subprocess_env('BAR');

  $r-send_http_header('text/plain');
  print "env_foo is: $env_foo\n";
  print "env_bar is: $env_bar\n";
  print "sp_foo is: $sp_foo\n";
  print "sp_bar is: $sp_bar\n";

yields:

  env_foo is: Foo
  env_bar is: 
  sp_foo is: 
  sp_bar is: Bar


 which means that setting $ENV{'TEST_VAR'}
 should work as well.

  that's right, though :)

  If you are going to get $r anyway, you are better off using pnotes() to
stash stuff, since it takes less overhead than populating %ENV with
subprocess_env().

--Geoff

 
 Make sure you are setting this in the parent request, if you are
 in a subrequest:
 
 $r = ($r-is_main) ? $r : $r-main;
 
 (darren)
 -- 
 The world is coming to an end!  Repent and return those library books!
 



Re: %ENV

2001-03-15 Thread darren chamberlain

Gene Dascher ([EMAIL PROTECTED]) said something to this effect on 03/15/2001:
 Well, with the subprocess_env(), I can see the key that I set in my cgi now,
 but the value that I set the key to is a Hash reference that I need to use
 in my cgi.  Unfortunately, all I get now is ENV{'TEST_VAR'} =
 HASH(0x860a278), and I can't pull my values out.

I'm running into this as well, but with a different Apache::Table
object. It seems that Apache::Table stringifies its values, which
makes it useless for applications like this.

The only Apache piece that doesn't stringify is pnotes, which is
only available to Perl handlers.

Another option is:

my $value_to_save = {
a = 1,
b = 2,
c = [ 3, 4, 5 ],
};

my $d = Data::Dumper-new([ $value_to_save ]);
$d-Indent(0)-Purity(1)-Terse(1)-Deepcopy(1);

$r-subprocess_env('TEST_VAR' = $d-Dump);

And then in whatever you use the value in:

my $restored_value = eval $r-subprocess_env('TEST_VAL');

$r-subprocess_env('TEST_VAL') looks something like (as a string):

{"a" = 1,"b" = 2,"c" = [3,4,5]}

You could also use Storable, but that is not a part of the
default install like Data::Dumper is, so I avoid it if I can.

(darren)

-- 
Make no laws whatever concerning speech, and speech will be free; so soon
as you make a declaration on paper that speech shall be free, you will have
a hundred lawyers proving that "freedom does not mean abuse, nor liberty
license"; and they will define and define freedom out of existence.  
-- Voltarine de Cleyre (19th Century French anarchist)



Re: Installing mod_perl on MacOSX

2001-03-15 Thread Ken Williams

[EMAIL PROTECTED] (Philippe de Rochambeau) wrote:
has anyone ever installed/compiled mod_perl for MacOSX? If so, how
exactly did you do it?


See this thread: 
   http://forum.swarthmore.edu/epigone/modperl/philsmangyi

  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



RE: %ENV

2001-03-15 Thread Geoffrey Young



 -Original Message-
 From: darren chamberlain [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 8:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: %ENV
 
 
 Gene Dascher ([EMAIL PROTECTED]) said something to 
 this effect on 03/15/2001:
  Well, with the subprocess_env(), I can see the key that I 
 set in my cgi now,
  but the value that I set the key to is a Hash reference 
 that I need to use
  in my cgi.  Unfortunately, all I get now is ENV{'TEST_VAR'} =
  HASH(0x860a278), and I can't pull my values out.
 
 I'm running into this as well, but with a different Apache::Table
 object. It seems that Apache::Table stringifies its values, which
 makes it useless for applications like this.

Apache::Table stringifies all of its values becuase it is really a C
structure in Apache (or somesuch - I'm not a C guy).   This is why notes()
(an Apache::Table object) can only hold string values and why pnotes is not
an Apache::Table object.  The Eagle book explains it pretty well.

pnotes is the way to go for non-string objects.  It is simple (unlike the
Data::Dumper example) and cleans itself up at the end of each request, which
is nice.

  my %hash = ();

  $r-pnotes(Foo = \%hash);

  my $href = $r-pnotes('Foo');

  my %old_hash = %$href;

HTH

--Geoff





Re: %ENV

2001-03-15 Thread darren chamberlain

Geoffrey Young ([EMAIL PROTECTED]) said something to this effect on 03/15/2001:
  Gene Dascher ([EMAIL PROTECTED]) said something to 
  this effect on 03/15/2001:
   Well, with the subprocess_env(), I can see the key that I 
  set in my cgi now,
   but the value that I set the key to is a Hash reference 
  that I need to use
   in my cgi.  Unfortunately, all I get now is ENV{'TEST_VAR'} =
^^^
   HASH(0x860a278), and I can't pull my values out.
  
  I'm running into this as well, but with a different Apache::Table
  object. It seems that Apache::Table stringifies its values, which
  makes it useless for applications like this.
 
 pnotes is the way to go for non-string objects.  It is simple (unlike the
 Data::Dumper example) and cleans itself up at the end of each request, which
 is nice.

I was under the impression (see the underlined piece above) that
the original idea was to be able to access the environment
variable from outside mod_perl, specifically in a CGI script. If
that is not the case, then pnotes is the best way to go.

(darren)

-- 
The glue that holds a Unix system together is the skilled human
being who understands how it works. The virtue of Unix is that it is
consistently understandable and configurable by anyone with a certain
minimum skillset
-- itsbruce (http://www.kuro5hin.org/?op=usertool=infouid=7232)



Re: unreleased sockets using DBI / DBD::mysql under mod_perl?

2001-03-15 Thread Tom Mornini

On Thu, 15 Mar 2001, Joern Janoschek wrote:

 What makes me scratch my head is the fact that the exit was
 placed before the dbi connect call... which leads me to the
 conclusion that the exit was simply not executed at all, no
 override version or something else. Strange...

Why scratch you head, just try it!

warn 'This is BEFORE the exit statement';
exit;
warn 'This is AFTER the exit statement';

On my systems I see only the 1st line...

-- 
-- Tom Mornini
-- InfoMania Printing and Prepress




Memory Leaks?

2001-03-15 Thread Jason Leidigh



At the the mod_perl/Apache web site (http://perl.apache.org/faq/#Why_is_httpd_using_so_much_memor)

there is a section about memory usage and a 
subroutine is given which can help test for memory leaks which perl "does no 
overtly report"


Joel Wagner reports that calling an undefined subroutine in a module can 
cause a tight loop that consumes all memory. Here is a way to catch such errors. 
Define an autoload subroutine 
  sub UNIVERSAL::AUTOLOAD {
  my $class = shift;
  warn "$class can't `$UNIVERSAL::AUTOLOAD'!\n";
  }

It will produce a nice error in error_log, giving the line number of the call 
and the name of the undefined subroutine.
I edited this to get a little more info:
 sub UNIVERSAL::AUTOLOAD 
{ my $class = 
shift; my($package,$file,$line) = 
caller; warn "$class 
can't `$UNIVERSAL::AUTOLOAD'\n\tCaller 
Info:\n\t$package\n\t$file\n\t$line\n"; $" = 
"\n"; warn @_ , "\n\n"; }
I was able to clean up a number of errors which 
seemed as though they were indeed causing leaks. For example:
$regex = qr'xx?'i;
Causes the following error:
(?i-xsm:xx?) can't 
`Regexp::DESTROY' Caller 
Info: 
Apache::JProxy 
/usr/local/apachessl/mod_perl/Apache/JProxy.pm 
780
The only solution I found was to not precompile the 
regex but it would definilty be nice so as to save some time as I repeatedly use 
numeros patterns which I was precompliling.

Another error I found was with the use of 
LWP:
LWP::UserAgent=HASH(0x5acb10) can't 
`LWP::UserAgent::DESTROY' Caller 
Info: 
Apache::JProxy 
/usr/local/apache2_mod_perl/mod_perl/Apache/JProxy.pm 
980
I was able to erradicat this error by adding 
DynaLoader to the @ISA of LWP::UserAgent.
OK not so bad but one error I have been unable 
erradicat is the following:
Apache=SCALAR(0x84da840) can't 
`Apache::DESTROY' Caller 
Info: 
main 
/dev/null 0
I have not found that Apache,pm has a ISA to add 
dynaloader to and I have not yet trid adding it my self but..any ideas on 
where this (apparent) leak is comming from? It adds4k toa 
child per request. On a site with the amount of traffic we have that is 
death

Thanks in advance!
Jason Z. LeidighProject LeaderUOL 
InternacionalAv.Libertador 1068 - Piso 3Capital Federal - ( C1112ABN 
)Buenos Aires - ArgentinaT.E: 
0054-11-5777-2446Fax: 0054-11-5777-2402www.uol.com.ar[EMAIL PROTECTED]


Re: Memory Leaks?

2001-03-15 Thread Robin Berjon

At 15:50 15/03/2001 -0300, Jason Leidigh wrote: 
I was able to clean up a number of errors which seemed as 
though they were indeed causing leaks.  For example:

$regex = qr'xx?'i;

Causes the following error:

(?i-xsm:xx?) can't `Regexp::DESTROY'

AUTOLOADs will catch DESTROYs, the latter being called on every object
destruction (I never noticed that they were called on regexen, that's
nice). Chances are, unless you clearly see a memory leak with DESTROYs
(which are expected not to be found most of the time) then your AUTOLOAD
should probably explicitly ignore them.

Another solution is:

sub Regexp::DESTROY {}
sub Apache::DESTROY {}
etc...

-- robin b.
"Science is like sex: sometimes something useful comes out, but that is not
the reason we are doing it." -- R. Feynman




RE: cgi_to_mod_perl manpage suggestion

2001-03-15 Thread Rob Bloodgood

 On Wed, 14 Mar 2001, Perrin Harkins wrote:

  On Wed, 14 Mar 2001, Issac Goldstand wrote:
 I still think that the above line is confusing:  It is
 because mod_perl is
   not sending headers by itelf, but rather your script must provide the
   headers (to be returned by mod_perl).  However, when you just
 say "mod_perl
   will send headers" it is misleading; it seems to indeicate
 that mod_perl
   will send "Content-Type: text/html\r\n\r\n" all by itself, and that
   conversely, to disable that PerlSendHeaders should be Off.
 
  Would it help if it said "PerlSendHeader On makes mod_perl act just like
  CGI with regard to headers"?

 A small correction: "PerlSendHeader On makes mod_perl act just like
 mod_cgi with regard to HTTP headers" :)

 CGI is a protocol...

Hmm.  What nobody seems to be mentioning explicitly (for the newbees who
would benefit from this discussion) are the things that
mod_cgi/PerlSendHeaders *DO*, that otherwise would have to be done manually.

Or, to put it more succinctly, what is the *exact* difference in headers
between PerlSendHeaders On and Off (which happen to be the same difference
as between a regular CGI script and an NPH script)?

It seems like almost all of the available documentation assumes that A) you
already know, or B) you don't need to know.

So at the risk of seeming bold, and understanding that this summary *is*
going to be incomplete:

There is a similarity of requirements between a CGI nph-script (Non Parsed
Headers) and mod_perl with PerlSendHeaders Off.

In basic CGI, one can simply:
print "Content-Type: text/html\r\n\r\n";

When the CGI script goes back to the web server, it can see from this
output, destined for the client browser, that:
The request was successful
The content type is specified
There is nothing further special about this request.

On (one of) my machines this returns:
HTTP/1.1 200 OK
Connection: close
Date: Thu, 15 Mar 2001 19:09:23 GMT
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux) mod_perl/1.19
Content-Type: text/html
Client-Date: Thu, 15 Mar 2001 19:09:24 GMT
Client-Peer: xx.xx.xx.xx:80

This is actually pretty boring so far.  I could send a cookie, too:
print "Set-Cookie: mycookie=test\r\n";
print "Content-Type: text/html\r\n\r\n";

Or any other headers I want, and the remainder is filled in by the webserver
for me.

But some magic happens when I want to, say, redirect.  Instead of printing
my content-type header,  all I have to do is print the following instead:
"Location: http://elsewhere.com\r\n\r\n";

Look what happens to the response!
HTTP/1.1 302 Found
Date: same
Server: same
Location: http://elsewhere.com
Connection: close
Content-Type: text/html

I have a different status line altogether (along with the Location: that I
printed)!  One can arbitrarily send custom status codes, too... I've done
this with CGI form re-submits:
print "Status: 204 No Content\r\n\r\n";

This returns:
HTTP/1.1 204 No Content
Date: Thu, 15 Mar 2001 19:22:21 GMT
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux) mod_perl/1.19
Connection: close
Content-Type: text/plain

Which is an expensive NO-OP to a browser. No change in window content
WHATSOEVER. (I love that trick.  Just love it! :-)

*NOW*
In mod_perl with PerlSendHeader Off, in order to perform a redirect one must
set up the headers manually:
Test.pm
===
package Test;

use Apache::Constants qw/:common REDIRECT/;
use strict;

sub handler() {
my $r = shift;
$r-content_type('text/html');
$r-headers_out-set(Location = "http://elsewhere.com");
return REDIRECT;
}

1;

REDIRECT here is a constant for the HTTP status code 302 (Moved).


But with PerlSendHeader On, I can take the same shortcuts as with CGI:

sub handler() {
print "Location: http://elsewhere.com\r\n\r\n";
}

And the response:
HTTP/1.1 302 Found
Date: Thu, 15 Mar 2001 19:32:10 GMT
Server: Apache/1.3.9 (Unix)  (Red Hat/Linux) mod_perl/1.21
Location: http://elsewhere.com
Connection: close
Content-Type: text/plain

But THE *SAME* CODE with PerlSendHeader Off returns:
Location: http://elsewhere.com

And that's *IT*.  Which parses as HTTP/0.9 and text/plain, causing my
browser to show that single line of text as my content.



NOW... to any non-newbies reading this, what have I left out? :-)

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;




Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Paul


Many thanks to everyone, Malcolm in particular, for humoring my
curiosity and assisting my esoteric research.

Hope it helped someone else, too, and sorry for cluttering up the
board.
But it *dod* say it was Very[OT]. ;o)

Paul

--- Malcolm Beattie [EMAIL PROTECTED] wrote:
 Paul writes:
  
  --- Brian Ingerson [EMAIL PROTECTED] wrote:
   Garrett Goebel wrote:

From: Paul [mailto:[EMAIL PROTECTED]]

 Anybody know offhand *why* my() lexicals are supposedly
 faster?
  
  
  
   Yes this is OT, but I'll contribute to the problem as well...
   
   My coworker Gisle Aas (maybe you've heard of him ;) says that
 globals
   and lexicals have identical speed because Perl optimizes out the
   symbol-table lookup.
   
   Trust Gisle.
  
  lol -- now *there's* an answer.
  So for my details I should go to the parse tree docs, and the code,
 I'm
  thinking.
  
  BTW -- with many thanks to everyone -- my question was "why are
 they
  faster", but the reason was never the speed -- it was to understand
 the
  way Perl stores and *accesses* lexicals.
  
  Any input? =o)
 
 If you have a reasonably recent Perl, you can do the following:
 
 % perl -MO=Terse,exec -e '$f = 123'
 OP (0x8180688) enter
 COP (0x8180628) nextstate
 SVOP (0x8175298) const  IV (0x80f8770) 123
 SVOP (0x817b488) gvsv  GV (0x81017b0) *f
 BINOP (0x8180600) sassign
 LISTOP (0x8180660) leave
 
 % perl -MO=Terse,exec -e 'my $f = 123'
 OP (0x81805d0) enter
 COP (0x8180598) nextstate
 SVOP (0x8104b88) const  IV (0x8104c9c) 123
 OP (0x817b490) padsv [1]
 BINOP (0x81761f0) sassign
 LISTOP (0x81752a0) leave
 
 As you can see from the output, for a non-lexical $f, Perl uses an
 opcode "gvsv GV *f". The gvsv instruction gets a pointer to the
 entire glob (*f) from which it dereferences the SV (scalar) part and
 pushes it on the stack. See pp_hot.c:
 
 PP(pp_gvsv)
 {
   djSP;
   EXTEND(SP,1);
   if (PL_op-op_private  OPpLVAL_INTRO)
   PUSHs(save_scalar(cGVOP_gv));
   else
   PUSHs(GvSV(cGVOP_gv));
   RETURN;
 }
 
 For the lexical, Perl has already determined at compile time that
 $f is in pad slot number 1 (think stack or register allocation).
 padsv is:
 
 PP(pp_padsv)
 {
   djSP; dTARGET;
   XPUSHs(TARG);
   ...
 
 If you navigate all the macros, you'll find that takes curpad
 (a pointer to an array of SV pointers: the current "stack frame"
 where "stack" is in the sense of a traditional compiler, not the
 (main) Perl stack) and pushes curpad[1] (remember $f was allocated
 slot 1 at compile time) onto the (main Perl) stack.
 
 --Malcolm
 
 -- 
 Malcolm Beattie [EMAIL PROTECTED]
 Unix Systems Programmer
 Oxford University Computing Services


__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



List your software with new feature-based search engine

2001-03-15 Thread BigSofte Vendor Services

Dear Software Manufacturer:

We can help you make it much easier to promote your software on the Internet. 

Your company is invited to list its software products at no charge on BigSoftE, the 
first Internet Software Search Engine. Launching this month, Bigsofte provides 
detailed product information to those searching on the BigSoftE.com site as well as on 
the most popular Internet IT and Search portals.  More than 6000 software companies 
have responded to BigSoftE including industry leaders such as Computer Associates, 
Hitachi, Informix, and Intuit. 

Please take just a few moments to learn more about BigSoftE and this time-sensitive 
offer. Read our FAQs, take a tour of the step-by-step listing process, and sign up to 
list your products today at http://www.bigsofte.com/vendors/index.cfm?id=42700153 

Hurry! BigSoftE will launch in just a few weeks. Respond by MARCH 31st to ensure extra 
exposure for your company and products during our launch promotions. Sign up now, or 
take a tour of BigSoftE by visiting 
http://www.bigsofte.com/vendors/index.cfm?id=42700153

Thank You,
BigSoftE Vendor Services
[EMAIL PROTECTED]
P. 877-947-6383 x 250


Note: The URL in this message was created specifically for the recipient. It is 
designed for their exclusive use. If you would like to request an invitation for a 
colleague, or you are having trouble with the URL, please go to 
http://www.bigsofte.com/listings.

**SOFTWARE RESELLERS AND SERVICE PROVIDERS**
In addition to information on software titles, BigSoftE provides links to resellers 
and service providers for each manufacturer's products. If your company is a reseller 
or service provider for software products manufactured by others, then please refer* 
your business partners who make software and request that they include your contact 
information as part of their listing. *To refer a manufacturer, reply to this message 
with REFERRAL in the subject line.

**INTERNATIONAL software companies**
Support for International companies is currently under development.  If you are a 
software manufacturer located outside the United States, please use your U.S. office 
address if available, or use a placeholder address and supply us with your correct 
international address in the comments field at the end of the listing process. We will 
manually update your company information to reflect your correct address before launch 
of bigsofte.com. Thank you for your consideration.

REMOVE INSTRUCTIONS
We apologize if we have contacted you in error. To be removed from our mailing list, 
please REPLY to this message with the word “REMOVE” in the subject line. 



Re: List your software with new feature-based search engine

2001-03-15 Thread Randal L. Schwartz

 "BigSofte" == BigSofte Vendor Services [EMAIL PROTECTED] writes:

BigSofte Dear Software Manufacturer:

I didn't know people still "manufacture" software.  I thought
only marketing "manufactured" things.

BigSofte We can help you make it much easier to promote your software
BigSofte on the Internet.

Yeah, that's already so terribly difficult.  I'm glad you're here to
help me!  Otherwise, I'd be limited to putting up a website, or maybe
starting a mailing list, or maybe having papers presented at
conferences, or submitting entries to Freshmeat, or maybe writing
books or columns, or possibly even word-of-mouth, or making sure my
website is parseable by Google, because that's where all my friends
use for searching.  Boy, I'm glad there's YET ANOTHER PROMOTION
MECHANISM!  Lemme guess... it consists of spamming unrelated mailing
lists!  Did I get it right?

"List your software with new feature-based search engine"

I think I'd rather list with a bug-based search engine, thank you.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



segfault on subrequest?

2001-03-15 Thread Pierre Phaneuf


I have a PerlTransHandler that is very simple:

sub handler {
  my($r) = @_;
  my($info);

  $info = $r-lookup_file('/home/pp/pierre.jpg')-content_type();

  warn("content type is $info\n");

  return DECLINED;
}

But it causes a segfault when invoked... I removed the
"-content_type()", so that I should normally see something like
"Apache::SubRequest=SCALAR(0x815eb54)", but it also crashes.

I tried using the exact same handler as a PerlHandler and as a
PerlHeaderParserHandler instead, and it works perfectly. I was thinking
that calling lookup_uri from within a PerlTransHandler might be a bad
idea (infinite loops!), but I would have thought that lookup_file would
be ok...

Okay, maybe everyone will jump in my face about this: this is on an
updated Red Hat 7.0 system, using Red Hat's Apache and mod_perl RPM
packages.

-- 
Pierre Phaneuf
http://www3.sympatico.ca/pphaneuf/



Re: List your software with new feature-based search engine

2001-03-15 Thread Paul


lol

Spamming a technical list seems less than prudent, doesn't it?
Jeez, I mean, just one anti-social teenager can make nasty packages
like the "I Love You" virus what could several thousand experienced
hackers with literally hundreds (minimally) of commercial-grade servers
at their whim do if they were sufficiently antagonized?

My, that's an ugly thought.
Good thing none of *us* are that grumpy, eh? =o)

Then again, we as a group have no history at all at cooperative effort.
Unless you want to count that open-source thing.

;o]

--- "Randal L. Schwartz" [EMAIL PROTECTED] wrote:
  "BigSofte" == BigSofte Vendor Services
 [EMAIL PROTECTED] writes:
 
 BigSofte Dear Software Manufacturer:
 
 I didn't know people still "manufacture" software.  I thought
 only marketing "manufactured" things.
 
 BigSofte We can help you make it much easier to promote your
 software
 BigSofte on the Internet.
 
 Yeah, that's already so terribly difficult.  I'm glad you're here to
 help me!  Otherwise, I'd be limited to putting up a website, or maybe
 starting a mailing list, or maybe having papers presented at
 conferences, or submitting entries to Freshmeat, or maybe writing
 books or columns, or possibly even word-of-mouth, or making sure my
 website is parseable by Google, because that's where all my friends
 use for searching.  Boy, I'm glad there's YET ANOTHER PROMOTION
 MECHANISM!  Lemme guess... it consists of spamming unrelated mailing
 lists!  Did I get it right?
 
 "List your software with new feature-based search engine"
 
 I think I'd rather list with a bug-based search engine, thank you.
 
 -- 
 Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
 777 0095
 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
 See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



RE: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Garrett Goebel
Title: RE: Very[OT]:Technical query re: scratchpad lookups for my() vars





From: Paul [mailto:[EMAIL PROTECTED]]
 
 Anybody know offhand *why* my() lexicals are supposedly faster?


Because a dynamic variable allocates a new value at runtime which occludes the global value until it's scope expires. In contrast, a lexical variable is unique to its code value's (CV) context which was determined at parse time. However, if you recursively call that CV, then Perl has to allocate a new value for the lexical.

Urban legend says that lexicals are on average 10% faster than dynamic variables. I wonder if that is true... and what difference recursion makes. I wonder how you'd write a script to benchmark that and actually benchmark the right thing...




Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Brian Ingerson

Garrett Goebel wrote:
 
 From: Paul [mailto:[EMAIL PROTECTED]]
 
  Anybody know offhand *why* my() lexicals are supposedly faster?
 
 Because a dynamic variable allocates a "new" value at runtime which occludes
 the global value until it's scope expires. In contrast, a lexical variable
 is unique to its code value's (CV) context which was determined at parse
 time. However, if you recursively call that CV, then Perl has to allocate a
 new value for the lexical.
 
 Urban legend says that lexicals are on average 10% faster than dynamic
 variables. I wonder if that is true... and what difference recursion makes.
 I wonder how you'd write a script to benchmark that and actually benchmark
 the right thing...

Yes this is OT, but I'll contribute to the problem as well...

My coworker Gisle Aas (maybe you've heard of him ;) says that globals
and lexicals have identical speed because Perl optimizes out the
symbol-table lookup.

Trust Gisle.

-- 
perl -le 'use Inline C=q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'



Re: List your software with new feature-based search engine

2001-03-15 Thread Stas Bekman

On Thu, 15 Mar 2001, Ask Bjoern Hansen wrote:

 On Thu, 15 Mar 2001, BigSofte Vendor Services wrote:

  Dear Software Manufacturer:

 @%#@$%^. I must have made a typo or whatever while going through
 the days spam and postings from non-subscribers. (averaging on a
 handful or three of spams and a few postings from
 non-subscribers)[1].

 Sorry.


  - ask (list foo for the perl.apache.org lists)

 [1] I do the same thing for the lists at perl.org and for whatever
 reason the modperl lists gets about the same amount or more spam
 than the perl.org lists combined.

I suppose that's because of the multiply mirrors of the perl.apache.org,
which includes the mod_perl list address twice (at index.html and
guide/help.html). I don't think this is a situation with perl.org lists.

Do you want me to make it harder for crawlers to grab the address? like
should I change it to modperl at perl.apache.org?


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: List your software with new feature-based search engine

2001-03-15 Thread Ask Bjoern Hansen

On Fri, 16 Mar 2001, Stas Bekman wrote:

  [1] I do the same thing for the lists at perl.org and for whatever
  reason the modperl lists gets about the same amount or more spam
  than the perl.org lists combined.
 
 I suppose that's because of the multiply mirrors of the perl.apache.org,
 which includes the mod_perl list address twice (at index.html and
 guide/help.html). I don't think this is a situation with perl.org lists.
 
 Do you want me to make it harder for crawlers to grab the address? like
 should I change it to modperl at perl.apache.org?

s/perl\.// if so.

I usually just provide the subscribe address,
[EMAIL PROTECTED]


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();
more than 70M impressions per day, http://valueclick.com




Re: List your software with new feature-based search engine

2001-03-15 Thread Stas Bekman

On Thu, 15 Mar 2001, Ask Bjoern Hansen wrote:

 On Fri, 16 Mar 2001, Stas Bekman wrote:

   [1] I do the same thing for the lists at perl.org and for whatever
   reason the modperl lists gets about the same amount or more spam
   than the perl.org lists combined.
 
  I suppose that's because of the multiply mirrors of the perl.apache.org,
  which includes the mod_perl list address twice (at index.html and
  guide/help.html). I don't think this is a situation with perl.org lists.
 
  Do you want me to make it harder for crawlers to grab the address? like
  should I change it to modperl at perl.apache.org?

 s/perl\.// if so.

of course

 I usually just provide the subscribe address,
 [EMAIL PROTECTED]

in fact the /index.html didn't have the posting address in first place and
I have fixed the guide (removed the post address). But we still have a
bunch of pages including it:

grep -lr [EMAIL PROTECTED] .
./CREDITS.html
./index.html
./dist/README
./dist/apache-modlist.html
./dist/.#apache-modlist.html.1.18
./guide/help.html
./guide/intro.html
./stories/convert/indextemplate.epl
./stories/ColbyChem.txt
./stories/idl-net.txt
./stories/wmboerse.txt
./tuning/index.html
./tuning/mod_perl_performance.html
./tuning/mod_perl_tuning.html



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





cvs commit: modperl-2.0/xs/maps apr_functions.map apr_structures.map apr_types.map

2001-03-15 Thread dougm

dougm   01/03/15 16:01:39

  Modified:xs/maps  apr_functions.map apr_structures.map apr_types.map
  Log:
  add new apr_ipsubnet_ functions
  
  Revision  ChangesPath
  1.4   +5 -1  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_functions.map 2001/03/13 05:25:11 1.3
  +++ apr_functions.map 2001/03/16 00:01:36 1.4
  @@ -327,11 +327,15 @@
apr_get_user_passwd
apr_get_userid
   
  -!MODULE=APR::NetworkIO
  +MODULE=APR::NetLib
apr_gethostname
apr_getnameinfo
   -apr_getservbyname
apr_parse_addr_port
  +PACKAGE=guess
  + apr_ipsubnet_t *:apr_ipsubnet_create | mpxs_ | \
  +  SV *:CLASS, p, ipstr, mask_or_numbits=NULL | new
  + apr_ipsubnet_test
   
   !MODULE=APR::Getopt
apr_getopt
  
  
  
  1.2   +1 -1  modperl-2.0/xs/maps/apr_structures.map
  
  Index: apr_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_structures.map,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_structures.map2001/03/05 03:49:21 1.1
  +++ apr_structures.map2001/03/16 00:01:37 1.2
  @@ -2,7 +2,7 @@
   
   IGNORE: apr_pool_t apr_os_ apr_vformatter_buff_t apr_pool_t \
   apr_table_t apr_in_addr_t apr_bucket_ apr_md5_ctx_t apr_sha1_ctx_t \
  -apr_uuid_t apr_datum_t apr_mmap_t apr_hdtr_t
  +apr_uuid_t apr_datum_t apr_mmap_t apr_hdtr_t apr_ipsubnet_t
   
   #buckets
   
  
  
  
  1.2   +3 -0  modperl-2.0/xs/maps/apr_types.map
  
  Index: apr_types.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_types.map,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_types.map 2001/03/05 03:49:21 1.1
  +++ apr_types.map 2001/03/16 00:01:37 1.2
  @@ -15,6 +15,9 @@
   apr_shutdown_how_e  | UNDEFINED
   apr_interface_e | UNDEFINED
   
  +#netlib stuff
  +struct apr_ipsubnet_t   | APR::IpSubnet
  +
   #bucket stuff
   struct apr_bucket   | APR::Bucket
   struct apr_bucket_brigade   | APR::Brigade
  
  
  



cvs commit: modperl-2.0/xs/APR/NetLib APR__NetLib.h

2001-03-15 Thread dougm

dougm   01/03/15 16:02:50

  Added:   xs/APR/NetLib APR__NetLib.h
  Log:
  wrapper for apr_ipsubnet_create()
  
  Revision  ChangesPath
  1.1  modperl-2.0/xs/APR/NetLib/APR__NetLib.h
  
  Index: APR__NetLib.h
  ===
  static MP_INLINE
  apr_ipsubnet_t *mpxs_apr_ipsubnet_create(pTHX_ SV *classname, apr_pool_t *p,
   const char *ipstr,
   const char *mask_or_numbits)
  {
  apr_status_t status;
  apr_ipsubnet_t *ipsub = NULL;
  status = apr_ipsubnet_create(ipsub, ipstr, mask_or_numbits, p);
  return ipsub;
  }
  
  
  



Sites running mod_perl

2001-03-15 Thread Lars Helgeson

I was just visiting the comanche site and saw a list of mod_perl
applications.  Just thought I'd share with you a few sites that I have
created using mod_perl.  Note: these are all on the same quad-P3 server
and receive together over 5,000 uniques per day.  We could not handle
this kind of load without a stable, powerful language like mod_perl.

1.  iceBase.com - a template-driven website builder and HTML email
campaign manager (rebranded under CoolerEmail.com and eKwiq.com)

2.  ArtRover.com - over 120,000 fully indexed works of art from over 20
different databases integrated together using SQL, performs the actual
search in under a second, and then goes out to each of the participating
companies' servers to bring in the images for that art

3.  JustOriginals.com - over 9,000 fully indexed works of art, completes
searches in about 200 ms


Just thought I'd let you know that I appreciate all the work you guys
have put into the software and that it has formed the basis for our
business.

--
Lars Helgeson
President/CEO
Sirius Technologies Inc.
iceBase.com

iceBase.com - Empower Yourself
Build Your Own Websites and Electronic Newsletters in Minutes





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

2001-03-15 Thread dougm

dougm   01/03/15 18:30:47

  Added:   lib/Apache SourceTables.pm
  Log:
  module to include the generated source tables and build hash versions of each
  
  Revision  ChangesPath
  1.1  modperl-2.0/lib/Apache/SourceTables.pm
  
  Index: SourceTables.pm
  ===
  package Apache::SourceTables;
  
  use Apache::StructureTable ();
  use Apache::FunctionTable ();
  
  #build hash versions of the tables
  %Apache::StructureTable =
map { $_-{type}, $_-{elts} } @$Apache::StructureTable;
  
  %Apache::FunctionTable =
map { $_-{name}, {elts = $_-{elts},
   return_type = $_-{return_type} } }
@$Apache::FunctionTable;
  
  1;
  __END__
  
  
  



cvs commit: modperl-2.0/util apr_pool_check.pl

2001-03-15 Thread dougm

dougm   01/03/15 18:32:44

  Added:   util apr_pool_check.pl
  Log:
  script to check which apr_ functions do not have access to a pool
  
  Revision  ChangesPath
  1.1  modperl-2.0/util/apr_pool_check.pl
  
  Index: apr_pool_check.pl
  ===
  #check which apr_ functions do not have access to a pool
  
  use lib qw(lib);
  
  use strict;
  use Apache::SourceTables ();
  
  my($functions, @nopool);
  
  #incomplete types (C::Scan only scans *.h, not *.c) we know have an apr_pool_t
  my %private = map { $_, 1 } qw{
  apr_dir_t apr_file_t apr_dso_handle_t apr_hash_t apr_hash_index_t apr_lock_t
  apr_socket_t apr_pollfd_t apr_threadattr_t apr_thread_t apr_threadkey_t
  apr_procattr_t apr_xlate_t apr_dbm_t apr_xml_parser
  };
  
  for my $entry (@$Apache::FunctionTable) {
  next unless $entry-{name} =~ /^apr_/;
  
  $functions++;
  
  unless (grep { find_pool($_-{type}) } @{ $entry-{args} }) {
  push @nopool, $entry;
  }
  }
  
  my $num_nopool = @nopool;
  
  print "$num_nopool functions (out of $functions) do not have access to a pool:\n\n";
  
  for my $entry (@nopool) {
  print "$entry-{return_type} $entry-{name}(",
(join ', ', map "$_-{type} $_-{name}", @{ $entry-{args} }),
  ")\n\n";
  }
  
  sub find_pool {
  my $type = shift;
  
  return 1 if $type =~ /^apr_pool_t/;
  
  $type =~ s/\s+\*+$//;
  $type =~ s/^(const|struct)\s+//g;
  
  if (my $elts = $Apache::StructureTable{$type}) {
  return 1 if $private{$type};
  
  for my $e (@$elts) {
  next if $e-{type} =~ /^$type/;
  return 1 if find_pool($e-{type});
  }
  }
  }
  
  
  



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

2001-03-15 Thread dougm

dougm   01/03/15 21:08:15

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c modperl_callback.c
modperl_callback.h
  Log:
  use proper prefix for all modperl_callback_ functions
  
  Revision  ChangesPath
  1.46  +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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Code.pm   2001/03/16 04:58:57 1.45
  +++ Code.pm   2001/03/16 05:08:15 1.46
  @@ -167,7 +167,7 @@
   my @register_hooks;
   
   while (my($class, $prototype) = each %{ $self-{hook_proto} }) {
  -my $callback = canon_func($class, 'callback');
  +my $callback = canon_func('callback', $class);
   my $return = $prototype-{ret} eq 'void' ? '' : 'return';
   my $i = -1;
   
  
  
  
  1.37  +1 -1  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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- mod_perl.c2001/03/15 04:34:04 1.36
  +++ mod_perl.c2001/03/16 05:08:15 1.37
  @@ -286,7 +286,7 @@
   
   modperl_response_init(r);
   
  -retval = modperl_per_dir_callback(MP_RESPONSE_HANDLER, r);
  +retval = modperl_callback_per_dir(MP_RESPONSE_HANDLER, r);
   
   if ((retval == DECLINED)  r-content_type) {
   r-handler = r-content_type; /* let http_core or whatever try */
  
  
  
  1.31  +21 -16modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- modperl_callback.c2001/03/16 04:58:58 1.30
  +++ modperl_callback.c2001/03/16 05:08:15 1.31
  @@ -91,8 +91,8 @@
   return status;
   }
   
  -int modperl_run_handlers(int idx, request_rec *r, conn_rec *c,
  - server_rec *s, int type, ...)
  +int modperl_callback_run_handlers(int idx, request_rec *r, conn_rec *c,
  +  server_rec *s, int type, ...)
   {
   #ifdef USE_ITHREADS
   pTHX;
  @@ -230,33 +230,38 @@
   return status;
   }
   
  -int modperl_per_dir_callback(int idx, request_rec *r)
  +int modperl_callback_per_dir(int idx, request_rec *r)
   {
  -return modperl_run_handlers(idx, r, NULL, r-server,
  -MP_HANDLER_TYPE_PER_DIR);
  +return modperl_callback_run_handlers(idx, r, NULL,
  + r-server,
  + MP_HANDLER_TYPE_PER_DIR);
   }
   
  -int modperl_per_srv_callback(int idx, request_rec *r)
  +int modperl_callback_per_srv(int idx, request_rec *r)
   {
  -return modperl_run_handlers(idx, r, NULL, r-server,
  -MP_HANDLER_TYPE_PER_SRV);
  +return modperl_callback_run_handlers(idx, r, NULL,
  + r-server,
  + MP_HANDLER_TYPE_PER_SRV);
   }
   
  -int modperl_connection_callback(int idx, conn_rec *c)
  +int modperl_callback_connection(int idx, conn_rec *c)
   {
  -return modperl_run_handlers(idx, NULL, c, c-base_server,
  -MP_HANDLER_TYPE_CONNECTION);
  +return modperl_callback_run_handlers(idx, NULL, c,
  + c-base_server,
  + MP_HANDLER_TYPE_CONNECTION);
   }
   
  -void modperl_process_callback(int idx, apr_pool_t *p, server_rec *s)
  +void modperl_callback_process(int idx, apr_pool_t *p, server_rec *s)
   {
  -modperl_run_handlers(idx, NULL, NULL, s, MP_HANDLER_TYPE_PROCESS, p);
  +modperl_callback_run_handlers(idx, NULL, NULL, s,
  +  MP_HANDLER_TYPE_PROCESS, p);
   }
   
  -void modperl_files_callback(int idx,
  +void modperl_callback_files(int idx,
   apr_pool_t *pconf, apr_pool_t *plog,
   apr_pool_t *ptemp, server_rec *s)
   {
  -modperl_run_handlers(idx, NULL, NULL, s, MP_HANDLER_TYPE_FILES,
  - pconf, plog, ptemp);
  +modperl_callback_run_handlers(idx, NULL, NULL, s,
  +  MP_HANDLER_TYPE_FILES,
  +  pconf, plog, ptemp);
   }
  
  
  
  1.17  +9 -9  modperl-2.0/src/modules/perl/modperl_callback.h
  
  Index: modperl_callback.h
  ===
  RCS file: 

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

2001-03-15 Thread dougm

dougm   01/03/15 21:52:29

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c mod_perl.h modperl_config.c
modperl_config.h modperl_interp.c modperl_interp.h
  Added:   src/modules/perl modperl_cmd.c modperl_cmd.h
  Log:
  move cmd stuffs into its own module
  
  Revision  ChangesPath
  1.48  +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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Code.pm   2001/03/16 05:32:34 1.47
  +++ Code.pm   2001/03/16 05:52:28 1.48
  @@ -511,7 +511,7 @@
  generate_trace  = {h = 'modperl_trace.h'},
   );
   
  -my @c_src_names = qw(interp tipool log config options callback handler
  +my @c_src_names = qw(interp tipool log config cmd options callback handler
gtop util filter mgv pcw);
   my @g_c_names = map { "modperl_$_" } qw(hooks directives flags xsinit);
   my @c_names   = ('mod_perl', (map "modperl_$_", @c_src_names));
  
  
  
  1.39  +9 -9  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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mod_perl.c2001/03/16 05:32:35 1.38
  +++ mod_perl.c2001/03/16 05:52:29 1.39
  @@ -233,23 +233,23 @@
   }
   
   static const command_rec modperl_cmds[] = {  
  -MP_SRV_CMD_ITERATE("PerlSwitches", switches, "Perl Switches"),
  -MP_SRV_CMD_ITERATE("PerlOptions", options, "Perl Options"),
  +MP_CMD_SRV_ITERATE("PerlSwitches", switches, "Perl Switches"),
  +MP_CMD_SRV_ITERATE("PerlOptions", options, "Perl Options"),
   #ifdef MP_TRACE
  -MP_SRV_CMD_TAKE1("PerlTrace", trace, "Trace level"),
  +MP_CMD_SRV_TAKE1("PerlTrace", trace, "Trace level"),
   #endif
   #ifdef USE_ITHREADS
  -MP_SRV_CMD_TAKE1("PerlInterpStart", interp_start,
  +MP_CMD_SRV_TAKE1("PerlInterpStart", interp_start,
"Number of Perl interpreters to start"),
  -MP_SRV_CMD_TAKE1("PerlInterpMax", interp_max,
  +MP_CMD_SRV_TAKE1("PerlInterpMax", interp_max,
"Max number of running Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMaxSpare", interp_max_spare,
  +MP_CMD_SRV_TAKE1("PerlInterpMaxSpare", interp_max_spare,
"Max number of spare Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMinSpare", interp_min_spare,
  +MP_CMD_SRV_TAKE1("PerlInterpMinSpare", interp_min_spare,
"Min number of spare Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMaxRequests", interp_max_requests,
  +MP_CMD_SRV_TAKE1("PerlInterpMaxRequests", interp_max_requests,
"Max number of requests per Perl interpreters"),
  -MP_DIR_CMD_TAKE1("PerlInterpLifetime", interp_lifetime,
  +MP_CMD_DIR_TAKE1("PerlInterpLifetime", interp_lifetime,
"Lifetime of a Perl interpreter"),
   #endif
   MP_CMD_ENTRIES,
  
  
  
  1.28  +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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_perl.h2001/03/16 04:58:58 1.27
  +++ mod_perl.h2001/03/16 05:52:29 1.28
  @@ -16,6 +16,7 @@
   #include "modperl_types.h"
   #include "modperl_util.h"
   #include "modperl_config.h"
  +#include "modperl_cmd.h"
   #include "modperl_handler.h"
   #include "modperl_callback.h"
   #include "modperl_tipool.h"
  
  
  
  1.26  +2 -147modperl-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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- modperl_config.c  2001/03/16 05:32:35 1.25
  +++ modperl_config.c  2001/03/16 05:52:29 1.26
  @@ -1,23 +1,5 @@
   #include "mod_perl.h"
   
  -char *modperl_cmd_push_handlers(MpAV **handlers, const char *name,
  -apr_pool_t *p)
  -{
  -modperl_handler_t *h = modperl_handler_new(p, name);
  -
  -if (!*handlers) {
  -*handlers = apr_array_make(p, 1, sizeof(modperl_handler_t *));
  -MP_TRACE_d(MP_FUNC, "created handler stack\n");
  -}
  -
  -/* XXX parse_handler if Perl is running */
  -
  -*(modperl_handler_t **)apr_array_push(*handlers) = h;
  -MP_TRACE_d(MP_FUNC, "pushed handler: %s\n", h-name);
  -
  -return NULL;
  -}
  -
   void 

cvs commit: modperl-2.0/src/modules/perl modperl_callback.c modperl_handler.c modperl_handler.h

2001-03-15 Thread dougm

dougm   01/03/15 22:32:15

  Modified:lib/ModPerl Code.pm
   src/modules/perl modperl_callback.c modperl_handler.c
modperl_handler.h
  Log:
  move some code into modperl_handler_lookup_handlers() so it can be reused for 
{get,set,push}_handlers
  
  Revision  ChangesPath
  1.49  +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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Code.pm   2001/03/16 05:52:28 1.48
  +++ Code.pm   2001/03/16 06:32:14 1.49
  @@ -113,7 +113,7 @@
   my($self, $h_add, $c_add) = @_;
   local $" = ",\n";
   while (my($class, $h) = each %{ $self-{handler_index_desc} }) {
  -my $func = canon_func($class, 'handler', 'desc');
  +my $func = canon_func('handler', 'desc', $class);
   my $array = join '_', 'MP', $func;
   my $proto = "const char *$func(int idx)";
   
  
  
  
  1.32  +2 -22 modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_callback.c2001/03/16 05:08:15 1.31
  +++ modperl_callback.c2001/03/16 06:32:15 1.32
  @@ -114,28 +114,8 @@
   return DECLINED;
   }
   
  -switch (type) {
  -  case MP_HANDLER_TYPE_PER_DIR:
  -av = dcfg-handlers[idx];
  -MP_TRACE_a_do(desc = modperl_per_dir_handler_desc(idx));
  -break;
  -  case MP_HANDLER_TYPE_PER_SRV:
  -av = scfg-handlers[idx];
  -MP_TRACE_a_do(desc = modperl_per_srv_handler_desc(idx));
  -break;
  -  case MP_HANDLER_TYPE_CONNECTION:
  -av = scfg-connection_cfg-handlers[idx];
  -MP_TRACE_a_do(desc = modperl_connection_handler_desc(idx));
  -break;
  -  case MP_HANDLER_TYPE_FILES:
  -av = scfg-files_cfg-handlers[idx];
  -MP_TRACE_a_do(desc = modperl_files_handler_desc(idx));
  -break;
  -  case MP_HANDLER_TYPE_PROCESS:
  -av = scfg-process_cfg-handlers[idx];
  -MP_TRACE_a_do(desc = modperl_process_handler_desc(idx));
  -break;
  -};
  +av = modperl_handler_lookup_handlers(dcfg, scfg, NULL,
  + type, idx, desc);
   
   if (!av) {
   MP_TRACE_h(MP_FUNC, "no %s handlers configured (%s)\n",
  
  
  
  1.2   +37 -0 modperl-2.0/src/modules/perl/modperl_handler.c
  
  Index: modperl_handler.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_handler.c 2001/03/16 04:58:59 1.1
  +++ modperl_handler.c 2001/03/16 06:32:15 1.2
  @@ -60,3 +60,40 @@
   
   va_end(args);
   }
  +
  +#define set_desc(dtype) \
  +MP_TRACE_a_do(if (desc) *desc = modperl_handler_desc_##dtype(idx))
  +
  +MpAV *modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  +  modperl_config_srv_t *scfg,
  +  modperl_config_req_t *rcfg,
  +  int type, int idx,
  +  const char **desc)
  +{
  +MpAV *av = NULL;
  +
  +switch (type) {
  +  case MP_HANDLER_TYPE_PER_DIR:
  +av = dcfg-handlers[idx];
  +set_desc(per_dir);
  +break;
  +  case MP_HANDLER_TYPE_PER_SRV:
  +av = scfg-handlers[idx];
  +set_desc(per_srv);
  +break;
  +  case MP_HANDLER_TYPE_CONNECTION:
  +av = scfg-connection_cfg-handlers[idx];
  +set_desc(connection);
  +break;
  +  case MP_HANDLER_TYPE_FILES:
  +av = scfg-files_cfg-handlers[idx];
  +set_desc(files);
  +break;
  +  case MP_HANDLER_TYPE_PROCESS:
  +av = scfg-process_cfg-handlers[idx];
  +set_desc(process);
  +break;
  +};
  +
  +return av;
  +}
  
  
  
  1.2   +5 -0  modperl-2.0/src/modules/perl/modperl_handler.h
  
  Index: modperl_handler.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_handler.h 2001/03/16 04:58:59 1.1
  +++ modperl_handler.h 2001/03/16 06:32:15 1.2
  @@ -8,5 +8,10 @@
   
   void modperl_handler_make_args(pTHX_ AV **avp, ...);
   
  +MpAV *modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  +  modperl_config_srv_t *scfg,
  +

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

2001-03-15 Thread dougm

dougm   01/03/15 22:35:18

  Modified:src/modules/perl modperl_config.h
  Log:
  allow modperl_config_req_get() to not core-dump if r == NULL
  
  Revision  ChangesPath
  1.23  +2 -2  modperl-2.0/src/modules/perl/modperl_config.h
  
  Index: modperl_config.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- modperl_config.h  2001/03/16 05:52:29 1.22
  +++ modperl_config.h  2001/03/16 06:35:18 1.23
  @@ -27,8 +27,8 @@
   }
   
   #define modperl_config_req_get(r) \
  - (modperl_config_req_t *) \
  -  ap_get_module_config(r-request_config, perl_module)
  + (r ? (modperl_config_req_t *) \
  +  ap_get_module_config(r-request_config, perl_module) : NULL)
   
   #define MP_dRCFG \
  modperl_config_req_t *rcfg = modperl_config_req_get(r)
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_callback.c modperl_handler.c modperl_handler.h

2001-03-15 Thread dougm

dougm   01/03/15 22:41:46

  Modified:src/modules/perl modperl_callback.c modperl_handler.c
modperl_handler.h
  Log:
  need to return the address incase caller needs to initialize (e.g. push/set)
  
  Revision  ChangesPath
  1.33  +4 -4  modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- modperl_callback.c2001/03/16 06:32:15 1.32
  +++ modperl_callback.c2001/03/16 06:41:46 1.33
  @@ -102,7 +102,7 @@
   MP_dDCFG;
   modperl_handler_t **handlers;
   apr_pool_t *p = NULL;
  -MpAV *av = NULL;
  +MpAV *av, **avp;
   int i, status = OK;
   const char *desc = NULL;
   va_list args;
  @@ -114,10 +114,10 @@
   return DECLINED;
   }
   
  -av = modperl_handler_lookup_handlers(dcfg, scfg, NULL,
  - type, idx, desc);
  +avp = modperl_handler_lookup_handlers(dcfg, scfg, NULL,
  +  type, idx, desc);
   
  -if (!av) {
  +if (!(avp  (av = *avp))) {
   MP_TRACE_h(MP_FUNC, "no %s handlers configured (%s)\n",
  desc, r ? r-uri : "");
   return DECLINED;
  
  
  
  1.3   +6 -6  modperl-2.0/src/modules/perl/modperl_handler.c
  
  Index: modperl_handler.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_handler.c 2001/03/16 06:32:15 1.2
  +++ modperl_handler.c 2001/03/16 06:41:46 1.3
  @@ -64,11 +64,11 @@
   #define set_desc(dtype) \
   MP_TRACE_a_do(if (desc) *desc = modperl_handler_desc_##dtype(idx))
   
  -MpAV *modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  -  modperl_config_srv_t *scfg,
  -  modperl_config_req_t *rcfg,
  -  int type, int idx,
  -  const char **desc)
  +MpAV **modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  +   modperl_config_srv_t *scfg,
  +   modperl_config_req_t *rcfg,
  +   int type, int idx,
  +   const char **desc)
   {
   MpAV *av = NULL;
   
  @@ -95,5 +95,5 @@
   break;
   };
   
  -return av;
  +return av ? av : NULL;
   }
  
  
  
  1.3   +5 -5  modperl-2.0/src/modules/perl/modperl_handler.h
  
  Index: modperl_handler.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_handler.h 2001/03/16 06:32:15 1.2
  +++ modperl_handler.h 2001/03/16 06:41:46 1.3
  @@ -8,10 +8,10 @@
   
   void modperl_handler_make_args(pTHX_ AV **avp, ...);
   
  -MpAV *modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  -  modperl_config_srv_t *scfg,
  -  modperl_config_req_t *rcfg,
  -  int type, int idx,
  -  const char **desc);
  +MpAV **modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg,
  +   modperl_config_srv_t *scfg,
  +   modperl_config_req_t *rcfg,
  +   int type, int idx,
  +   const char **desc);
   
   #endif /* MODPERL_HANDLER_H */
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_config.c modperl_filter.c modperl_handler.c modperl_mgv.c modperl_types.h

2001-03-15 Thread dougm

dougm   01/03/15 23:30:25

  Modified:lib/ModPerl Code.pm
   src/modules/perl modperl_config.c modperl_filter.c
modperl_handler.c modperl_mgv.c modperl_types.h
  Log:
  no need for modperl_{files,process,connection}_config_t
  
  Revision  ChangesPath
  1.50  +6 -4  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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Code.pm   2001/03/16 06:32:14 1.49
  +++ Code.pm   2001/03/16 07:30:21 1.50
  @@ -71,8 +71,7 @@
   );
   
   for my $class (qw(Process Connection Files)) {
  -my $lc_class = lc $class;
  -$directive_proto{$class}-{cfg}-{name} = "scfg-${lc_class}_cfg";
  +$directive_proto{$class}-{cfg}-{name} = 'scfg';
   $directive_proto{$class}-{cfg}-{get} = $scfg_get;
   
   for (qw(args scope)) {
  @@ -82,6 +81,9 @@
   
   while (my($k,$v) = each %directive_proto) {
   $directive_proto{$k}-{ret} = 'const char *';
  +my $handlers = join '_', 'handlers', canon_lc($k);
  +$directive_proto{$k}-{handlers} =
  +  join '-', $directive_proto{$k}-{cfg}-{name}, $handlers;
   }
   
   #XXX: allow disabling of PerDir hooks on a PerDir basis
  @@ -144,7 +146,7 @@
   my $handler_type = canon_define('HANDLER_TYPE', $class);
   
   print $h_fh "\n#define ",
  -  canon_define($class, 'num_handlers'), " $n\n\n";
  +  canon_define('HANDLER_NUM', $class), " $n\n\n";
   
   print $h_fh "#define $handler_type $type\n\n";
   
  @@ -271,7 +273,7 @@
   my $protostr = canon_proto($prototype, $name);
   my $flag = 'MpSrv' . canon_uc($h);
   my $ix = $self-{handler_index}-{$class}-[$i++];
  -my $av = "$prototype-{cfg}-{name}-handlers[$ix]";
  +my $av = "$prototype-{handlers} [$ix]";
   
   print $h_fh "$protostr;\n";
   
  
  
  
  1.27  +13 -22modperl-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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- modperl_config.c  2001/03/16 05:52:29 1.26
  +++ modperl_config.c  2001/03/16 07:30:22 1.27
  @@ -32,8 +32,8 @@
   { /* XXX: should do a proper merge of the arrays */
 /* XXX: and check if Perl*Handler is disabled */
   int i;
  -for (i=0; iMP_PER_DIR_NUM_HANDLERS; i++) {
  -merge_item(handlers[i]);
  +for (i=0; i  MP_HANDLER_NUM_PER_DIR; i++) {
  +merge_item(handlers_per_dir[i]);
   }
   }
   
  @@ -63,21 +63,6 @@
   
   modperl_config_srv_argv_push((char *)ap_server_argv0);
   
  -#ifdef MP_CONNECTION_NUM_HANDLERS
  -scfg-connection_cfg = (modperl_connection_config_t *)
  -apr_pcalloc(p, sizeof(*scfg-connection_cfg));
  -#endif
  -
  -#ifdef MP_FILES_NUM_HANDLERS
  -scfg-files_cfg = (modperl_files_config_t *)
  -apr_pcalloc(p, sizeof(*scfg-files_cfg));
  -#endif
  -
  -#ifdef MP_PROCESS_NUM_HANDLERS
  -scfg-process_cfg = (modperl_process_config_t *)
  -apr_pcalloc(p, sizeof(*scfg-process_cfg));
  -#endif
  -
   MP_TRACE_d(MP_FUNC, "0x%lx\n", (unsigned long)scfg);
   
   return scfg;
  @@ -161,15 +146,21 @@
   #endif
   
   merge_item(argv);
  -merge_item(files_cfg);
  -merge_item(process_cfg);
  -merge_item(connection_cfg);
   
   { /* XXX: should do a proper merge of the arrays */
 /* XXX: and check if Perl*Handler is disabled */
   int i;
  -for (i=0; iMP_PER_SRV_NUM_HANDLERS; i++) {
  -merge_item(handlers[i]);
  +for (i=0; i  MP_HANDLER_NUM_PER_SRV; i++) {
  +merge_item(handlers_per_srv[i]);
  +}
  +for (i=0; i  MP_HANDLER_NUM_FILES; i++) {
  +merge_item(handlers_files[i]);
  +}
  +for (i=0; i  MP_HANDLER_NUM_PROCESS; i++) {
  +merge_item(handlers_process[i]);
  +}
  +for (i=0; i  MP_HANDLER_NUM_CONNECTION; i++) {
  +merge_item(handlers_connection[i]);
   }
   }
   
  
  
  
  1.10  +1 -1  modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_filter.c  2001/03/15 05:39:07 1.9
  +++ modperl_filter.c  2001/03/16 07:30:22 1.10
  @@ -336,7 +336,7 @@
   MP_dDCFG;
   MpAV *av;
   
  -if ((av = dcfg-handlers[MP_OUTPUT_FILTER_HANDLER])) {
  +if ((av = dcfg-handlers_per_dir[MP_OUTPUT_FILTER_HANDLER])) {