perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestError api.pm
Date Thu, 09 Sep 2004 18:48:03 GMT
stas        2004/09/09 11:48:03

  Modified:    .        Changes
               src/modules/perl modperl_global.c
               t/response/TestAPI request_subclass.pm
               t/response/TestError api.pm
  Log:
  fix Apache->request($r) to be set-able even w/: PerlOptions
  -GlobalRequest
  
  Revision  Changes    Path
  1.479     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.478
  retrieving revision 1.479
  diff -u -u -r1.478 -r1.479
  --- Changes	9 Sep 2004 18:29:09 -0000	1.478
  +++ Changes	9 Sep 2004 18:48:03 -0000	1.479
  @@ -12,6 +12,9 @@
   
   =item 1.99_17-dev
   
  +fix Apache->request($r) to be set-able even w/: PerlOptions
  +-GlobalRequest [Stas]
  +
   Add Apache::Reload->unregister_module() to explicitely remove a
   module from Apache::Reload's monitoring list [Gozer]
   
  
  
  
  1.10      +2 -3      modperl-2.0/src/modules/perl/modperl_global.c
  
  Index: modperl_global.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_global.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- modperl_global.c	13 Jun 2004 05:39:09 -0000	1.9
  +++ modperl_global.c	9 Sep 2004 18:48:03 -0000	1.10
  @@ -46,18 +46,17 @@
   {
       request_rec *cur = NULL;
       apr_status_t status = modperl_tls_get_request_rec(&cur);
  -
       if (status != APR_SUCCESS) {
           /* an internal problem */
           Perl_croak(aTHX_ "failed to retrieve the request object");
       }
   
  -    if (!cur) {
  +    if (GIMME_V != G_VOID && !cur) {
           /* wrong configuration */
           Perl_croak(aTHX_ "Global $r object is not available. Set:\n"
                      "\tPerlOptions +GlobalRequest\nin httpd.conf");
       }
  -    
  +
       if (svr) {
           modperl_global_request_obj_set(aTHX_ svr);
       }
  
  
  
  1.2       +1 -1      modperl-2.0/t/response/TestAPI/request_subclass.pm
  
  Index: request_subclass.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/request_subclass.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- request_subclass.pm	15 Jul 2004 21:35:48 -0000	1.1
  +++ request_subclass.pm	9 Sep 2004 18:48:03 -0000	1.2
  @@ -24,7 +24,7 @@
   
       plan $r, tests => 5;
   
  -    eval { Apache->request; };
  +    eval { my $gr = Apache->request; };
       ok $@;
   
       ok $r->uri eq $location;
  
  
  
  1.3       +1 -1      modperl-2.0/t/response/TestError/api.pm
  
  Index: api.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestError/api.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- api.pm	3 Jul 2004 18:45:46 -0000	1.2
  +++ api.pm	9 Sep 2004 18:48:03 -0000	1.3
  @@ -19,7 +19,7 @@
       $r->content_type('text/plain');
   
       # PerlOptions -GlobalRequest is in effect
  -    eval { Apache->request; };
  +    eval { my $gr = Apache->request; };
       ok t_cmp($@, 
                qr/\$r object is not available/,
                "unavailable global $r object");
  
  
  

Mime
View raw message