httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Doug MacEachern)
Subject mod_perl testing
Date Wed, 01 May 1996 23:20:29 GMT
It's not quite there yet, but enough is there for testing.  If you get a
chance to look at it, I'd really like hear how it goes, problems, feedback,
etc.  This is the work that Gisle Aas started a little while back, which I
have picked up recently.  There's half-decent documentation that explains more.

You can grab it at:

While I'm here, and you're there, if anyone would like to check out
(authenticate via Perl's DBI module)

Here are some issues I've scribbled down:

o *** We're leaking!! ***
Andrew McRae <> pointed this out to me,
I've attached his sample leaker below, watch it grow!
I tried to set perl_destruct_level, to make extra sure everything
is cleaned-up, this dumped core on me.
Anyone know what's happening here?
Andrew or myself will run this by the perl5porters.
I hope this is simple fix, or that I'm just imagining things...

o the client is not hooked up to the script's STDIN/STDOUT
  I had this working against 1.0.5 sources, but then the io scheme
  changed in 1.1bx.  I'll get back to this.

o Makefile.tmpl needs cleaning

o Currently, we keep the 'Authorization' header from the script.


o Should we have an file?  Currently mod_perl does the 'bootstrap

o Some methods such as $r->set_content_type could stand to loose the set_ prefix
  provided then return a value.

  $ct = $r->content_type; #get it
  $r->content_type("text/html"); #set it

o Add other methods would be handy to have.

o Other stuff I'm not thinking of...


---8<---- leak.c

#include <stdio.h>

#include <EXTERN.h>
#include <perl.h>

PerlInterpreter *my_perl;
char *my_argv[] = { "", "-e", "sub leaker { my(@a) = 1..10_000 }" };

void leak(void) {
  my_perl = perl_alloc();
  perl_construct( my_perl );
  perl_parse(my_perl, NULL, 3, my_argv, NULL);

  perl_call_pv("leaker", G_DISCARD|G_NOARGS);

  /* perl_destruct_level = 2; */

int main(int argc, char** argv, char **envp) {
  int count;

  for (count = 1; count <= 10; count++) {
    printf("Step %d...\n", count);
    printf("    done\n");

View raw message