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/t/net/perl/io perlio.pl
Date Fri, 05 Jun 1998 02:08:26 GMT
dougm       98/06/04 19:08:25

  Modified:    .        Changes
               src/modules/perl Apache.xs mod_perl.h perl_config.c
               t/net/perl api.pl
               t/net/perl/io perlio.pl
  Log:
  added $r->location method
  
  Revision  Changes    Path
  1.45      +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Changes	1998/06/04 17:36:42	1.44
  +++ Changes	1998/06/05 02:08:09	1.45
  @@ -22,6 +22,8 @@
   
   =item 1.11_01-dev
   
  +added $r->location method
  +
   Various fixes and improvements to the APACI support:
   
    - Added support for PERL_THREADS to apaci stuff.  
  
  
  
  1.30      +14 -0     modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Apache.xs	1998/06/03 20:57:11	1.29
  +++ Apache.xs	1998/06/05 02:08:17	1.30
  @@ -1814,6 +1814,20 @@
     
   #  void *per_dir_config;		/* Options set in config files, etc. */
   
  +char *
  +location(r)
  +    Apache  r
  +
  +    CODE:
  +    if(r->per_dir_config) {				   
  +	dPPDIR;
  +        RETVAL = cld->location;
  +    }
  +    else XSRETURN_UNDEF;
  +
  +    OUTPUT:
  +    RETVAL
  +
   SV *
   dir_config(r, key=NULL, ...)
       Apache  r
  
  
  
  1.25      +1 -0      modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_perl.h	1998/05/29 22:07:43	1.24
  +++ mod_perl.h	1998/06/05 02:08:18	1.25
  @@ -810,6 +810,7 @@
       U32 flags;
       int SendHeader;
       int SetupEnv;
  +    char *location;
   } perl_dir_config;
   
   typedef struct {
  
  
  
  1.20      +4 -0      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- perl_config.c	1998/05/18 23:54:01	1.19
  +++ perl_config.c	1998/06/05 02:08:19	1.20
  @@ -209,6 +209,9 @@
   
       array_header *vars = (array_header *)base->vars;
   
  +    new->location = add->location ? 
  +        add->location : base->location;
  +
       /* XXX: what triggers such a condition ?*/
       if(vars && (vars->nelts > 100000)) {
   	fprintf(stderr, "[warning] PerlSetVar->nelts = %d\n", vars->nelts);
  @@ -287,6 +290,7 @@
       perl_dir_config *cld =
   	(perl_dir_config *)palloc(p, sizeof (perl_dir_config));
   
  +    cld->location = pstrdup(p, dirname);
       cld->vars = make_table(p, 5); 
       cld->env  = make_table(p, 5); 
       cld->flags = MPf_ENV;
  
  
  
  1.18      +5 -1      modperl/t/net/perl/api.pl
  
  Index: api.pl
  ===================================================================
  RCS file: /export/home/cvs/modperl/t/net/perl/api.pl,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- api.pl	1998/06/03 20:57:11	1.17
  +++ api.pl	1998/06/05 02:08:23	1.18
  @@ -16,7 +16,7 @@
   %ENV = $r->cgi_env;
   $r->subprocess_env; #test void context
   
  -my $tests = 44;
  +my $tests = 45;
   my $test_get_set = Apache->can('set_handlers') && ($tests += 4);
   my $test_custom_response = (MODULE_MAGIC_NUMBER >= 19980324) && $tests++;
   my $test_dir_config = $INC{'Apache/TestDirectives.pm'} && ($tests += 7);
  @@ -32,6 +32,10 @@
   test ++$i, -d $Apache::Server::CWD;
   print "\$Apache::Server::CWD == $Apache::Server::CWD\n";
   print "\$0 == $0\n";
  +
  +my $loc = $r->location;
  +print "<Location $loc>\n";
  +test ++$i, $loc and $r->uri =~ m:^$loc:;
   
   test ++$i, $r->get_remote_host;
   test ++$i, $r->get_server_port;
  
  
  
  1.3       +3 -0      modperl/t/net/perl/io/perlio.pl
  
  Index: perlio.pl
  ===================================================================
  RCS file: /export/home/cvs/modperl/t/net/perl/io/perlio.pl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- perlio.pl	1998/03/19 23:09:08	1.2
  +++ perlio.pl	1998/06/05 02:08:24	1.3
  @@ -10,6 +10,7 @@
   #PerlSendHeader On
   #PerlSetupEnv   On
   
  +my $r = shift;
   my $sub = "test_$ENV{QUERY_STRING}";
   if (defined &{$sub}) {
       &{$sub};
  @@ -23,6 +24,8 @@
   
       print "perlio test...\n";
       print "\$^X is $^X\n" if $^X;
  +    my $loc = $r->location;
  +    print "<Location $loc>\n";
       my(@args);
   
       if (@args = split(/\+/, $ENV{QUERY_STRING})) {
  
  
  

Mime
View raw message