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/lib/Apache test.pm
Date Mon, 02 Oct 2000 21:06:23 GMT
dougm       00/10/02 14:06:21

  Modified:    lib/Apache test.pm
  Log:
  bandaid kens recent patch
  
  Revision  Changes    Path
  1.19      +3 -2      modperl/lib/Apache/test.pm
  
  Index: test.pm
  ===================================================================
  RCS file: /home/cvs/modperl/lib/Apache/test.pm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- test.pm	2000/10/02 20:25:13	1.18
  +++ test.pm	2000/10/02 21:06:19	1.19
  @@ -210,7 +210,8 @@
   
   sub fetch {
       # Old code calls fetch() as a function, new code as a method
  -    shift() if UNIVERSAL::isa($_[0], __PACKAGE__);
  +    my $want_response;
  +    $want_response = shift() if UNIVERSAL::isa($_[0], __PACKAGE__);
       my ($ua, $url) = (@_ == 1 ? ($UA, shift()) : @_);
       my $request = ref $url ? $url : {uri=>$url};
   
  @@ -228,7 +229,7 @@
       my $req = new HTTP::Request(@{$request}{'method','uri','headers','content'});
       my $response = $ua->request($req);
   
  -    return wantarray ? ($response->content, $response) : $response->content;
  +    return $want_response ? $response : $response->content;
   }
   
   sub simple_fetch {
  
  
  

Mime
View raw message