stas        2003/08/20 17:03:27

  Modified:    t/response/TestAPI rflush.pm
  Log:
  make the test more elaborate, by dynamically change the values of $|
  
  Revision  Changes    Path
  1.2       +7 -6      modperl-2.0/t/response/TestAPI/rflush.pm
  
  Index: rflush.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/rflush.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- rflush.pm 7 Aug 2003 23:46:27 -0000       1.1
  +++ rflush.pm 21 Aug 2003 00:03:27 -0000      1.2
  @@ -34,13 +34,14 @@
   sub response {
       my $r = shift;
   
  -    # just to make sure that print() won't flush, or we would get the
  -    # count wrong
  -    local $| = 0;
  -
       $r->content_type('text/plain');
  -    $r->print("<foo");
  -    $r->rflush;     # this sends the data in the buffer + flush bucket
  +
  +    # print is now unbuffered
  +    local $| = 1;
  +    $r->print("<foo"); # this sends the data in the buffer + flush bucket
  +
  +    # print is now buffered
  +    local $| = 0;
       $r->print("bar>");
       $r->rflush;     # this sends the data in the buffer + flush bucket
       $r->print("<who");
  
  
  

Reply via email to