perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl perl_config.c
Date Thu, 02 Jul 1998 14:53:53 GMT
dougm       98/07/02 07:53:53

  Modified:    .        Changes
               src/modules/perl perl_config.c
  Log:
  set $0 to .conf file name when inside <Perl> sections
  
  Revision  Changes    Path
  1.62      +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- Changes	1998/06/26 00:11:44	1.61
  +++ Changes	1998/07/02 14:53:51	1.62
  @@ -8,6 +8,8 @@
   
   =item 1.12_01-dev
   
  +set $0 to .conf file name when inside <Perl> sections
  +
   fixed $r->subprocess_env bug introduced in 1.12, spotted by Ken Williams
   
   '*CORE::GLOBAL::exit = \&Apache::exit' for 5.005-tobe+ Perls 
  
  
  
  1.21      +10 -8     modperl/src/modules/perl/perl_config.c
  
  Index: perl_config.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/perl_config.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- perl_config.c	1998/06/05 02:08:19	1.20
  +++ perl_config.c	1998/07/02 14:53:52	1.21
  @@ -1227,7 +1227,7 @@
       }   
   }
   
  -CHAR_P perl_section (cmd_parms *cmd, void *dummy, const char *arg)
  +CHAR_P perl_section (cmd_parms *parms, void *dummy, const char *arg)
   {
       CHAR_P errmsg;
       SV *code, *val;
  @@ -1236,13 +1236,13 @@
       I32 klen, dotie=FALSE;
       char line[MAX_STRING_LEN];
   
  -    if(!PERL_RUNNING()) perl_startup(cmd->server, cmd->pool); 
  +    if(!PERL_RUNNING()) perl_startup(parms->server, parms->pool); 
   
       if(PERL_RUNNING()) {
   	code = newSV(0);
   	sv_setpv(code, "");
   	if(arg) 
  -	    errmsg = perl_srm_command_loop(cmd, code);
  +	    errmsg = perl_srm_command_loop(parms, code);
       }
       else {
   	MP_TRACE_s(fprintf(stderr, 
  @@ -1259,6 +1259,8 @@
       perl_section_hash_init("Files", dotie);
       perl_section_hash_init("Limit", dotie);
   
  +    sv_setpv(perl_get_sv("0", TRUE), cmd_filename);
  +
       perl_eval_sv(code, G_DISCARD);
   
       {
  @@ -1282,19 +1284,19 @@
   	if((sv = GvSV((GV*)val))) {
   	    if(SvTRUE(sv)) {
   		if(STRING_MEAL(key)) {
  -		    perl_eat_config_string(cmd, dummy, sv);
  +		    perl_eat_config_string(parms, dummy, sv);
   		}
   		else {
   		    MP_TRACE_s(fprintf(stderr, "SVt_PV: $%s = `%s'\n", 
   				     key, SvPV(sv,na)));
   		    sprintf(line, "%s %s", key, SvPV(sv,na));
  -		    perl_handle_command(cmd, dummy, line);
  +		    perl_handle_command(parms, dummy, line);
   		}
   	    }
   	}
   
   	if((hv = GvHV((GV*)val))) {
  -	    perl_handle_command_hv(hv, key, cmd, dummy);
  +	    perl_handle_command_hv(hv, key, parms, dummy);
   	}
   	else if((av = GvAV((GV*)val))) {	
   	    module *mod = top_module;
  @@ -1304,7 +1306,7 @@
   	    if(STRING_MEAL(key)) {
   		SV *tmpsv;
   		while((tmpsv = av_shift(av)) != &sv_undef)
  -		    perl_eat_config_string(cmd, dummy, tmpsv);
  +		    perl_eat_config_string(parms, dummy, tmpsv);
   		continue;
   	    }
   
  @@ -1335,7 +1337,7 @@
   		break;
   	    }
   	    if(shift > alen) shift = 1; /* elements are refs */ 
  -	    perl_handle_command_av(av, shift, key, cmd, dummy);
  +	    perl_handle_command_av(av, shift, key, parms, dummy);
   	}
       }
       SvREFCNT_dec(code);
  
  
  

Mime
View raw message