perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl/src/modules/perl perl_config.c
Date Thu, 02 Mar 2000 01:10:28 GMT
dougm       00/03/01 17:10:27

  Modified:    .        Changes
               src/modules/perl perl_config.c
  Log:
  avoid quoting <Perl> config if args_how == RAW_ARGS
  
  Revision  Changes    Path
  1.381     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.380
  retrieving revision 1.381
  diff -u -r1.380 -r1.381
  --- Changes	2000/03/02 00:54:07	1.380
  +++ Changes	2000/03/02 01:10:26	1.381
  @@ -10,6 +10,9 @@
   
   =item 1.21_01-dev
   
  +avoid quoting <Perl> config if args_how == RAW_ARGS
  +thanks to Michael Schout for the spot
  +
   PerlPassEnv maintains it's value beyond the first request,
   thanks to Chris Thorman for the spot
   
  
  
  
  1.84      +18 -6     modperl/src/modules/perl/perl_config.c
  
  Index: perl_config.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- perl_config.c	2000/03/02 00:54:08	1.83
  +++ perl_config.c	2000/03/02 01:10:27	1.84
  @@ -1492,17 +1492,29 @@
   				   key, cmd, config);
   	}
   	else {
  +	    int do_quote = cmd->cmd->args_how != RAW_ARGS;
   	    SV *sv = newSV(0);
   	    sv_catpv(sv, key);
  -	    sv_catpvn(sv, " \"", 2);
  -
  +	    if (do_quote) {
  +		sv_catpvn(sv, " \"", 2);
  +	    }
  +	    else {
  +		sv_catpvn(sv, " ", 1);
  +	    }
   	    for(j=1; j<=n; j++) {
   		sv_catsv(sv, av_shift(av));
  -		if(j != n)
  -		    sv_catpvn(sv, "\" \"", 3);
  +		if (j != n) {
  +		    if (do_quote) {
  +			sv_catpvn(sv, "\" \"", 3);
  +		    }
  +		    else {
  +			sv_catpvn(sv, " ", 1);
  +		    }
  +		}
  +	    }
  +	    if (do_quote) {
  +		sv_catpvn(sv,"\"", 1);
   	    }
  -	    sv_catpvn(sv,"\"",1);
  -
   	    perl_handle_command(cmd, config, SvPVX(sv));
   	    SvREFCNT_dec(sv);
   	}
  
  
  

Mime
View raw message