stas        2003/01/28 17:33:17

  Modified:    t/hooks  push_handlers.t
               t/hooks/TestHooks push_handlers.pm
  Log:
  mix in the handlers configured from httpd.conf
  
  Revision  Changes    Path
  1.2       +2 -1      modperl-2.0/t/hooks/push_handlers.t
  
  Index: push_handlers.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/push_handlers.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- push_handlers.t   29 Jan 2003 01:25:45 -0000      1.1
  +++ push_handlers.t   29 Jan 2003 01:33:17 -0000      1.2
  @@ -7,7 +7,8 @@
   
   plan tests => 1;
   
  -my @refs = qw(coderef full_coderef coderef1 coderef2 coderef3);
  +my @refs = qw(conf conf1 conf2 coderef 
  +             full_coderef coderef1 coderef2 coderef3);
   my @anon = qw(anonymous anonymous1 coderef4 anonymous3);
   
   my @strings = @refs;
  
  
  
  1.2       +12 -4     modperl-2.0/t/hooks/TestHooks/push_handlers.pm
  
  Index: push_handlers.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/push_handlers.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- push_handlers.pm  29 Jan 2003 01:25:45 -0000      1.1
  +++ push_handlers.pm  29 Jan 2003 01:33:17 -0000      1.2
  @@ -14,7 +14,6 @@
       my $r = shift;
   
       $r->handler("modperl");
  -    $r->push_handlers(PerlResponseHandler => \&start);
   
       $r->push_handlers(PerlResponseHandler => \&coderef);
       $r->push_handlers(PerlResponseHandler => 
  @@ -38,11 +37,18 @@
       return Apache::DECLINED;
   }
   
  +sub end { return Apache::DONE }
  +sub say { shift->print(shift,"\n"); return Apache::OK }
   
  -sub start { shift->content_type('text/plain'); return Apache::OK }
  -sub end   { return Apache::DONE }
  -sub say   { shift->print(shift,"\n"); return Apache::OK }
  +sub conf {
  +    # this one is configured from httpd.conf
  +    my $r= shift;
  +    $r->content_type('text/plain');
  +    return say($r, "conf");
  +}
   
  +sub conf1        { return say(shift, "conf1")        }
  +sub conf2        { return say(shift, "conf2")        }
   sub coderef      { return say(shift, "coderef")      }
   sub coderef1     { return say(shift, "coderef1")     }
   sub coderef2     { return say(shift, "coderef2")     }
  @@ -56,6 +62,8 @@
     <Location /TestHooks::push_handlers>
         SetHandler modperl
         PerlHeaderParserHandler TestHooks::push_handlers
  +      PerlResponseHandler     TestHooks::push_handlers::conf
  +      PerlResponseHandler     TestHooks::push_handlers::conf1 
TestHooks::push_handlers::conf2
     </Location>
   </NoAutoConfig>
   
  
  
  


Reply via email to