The warnings in the test of seem to be caused by running CGI::Base from the
CGI-modules package through perl -w.  The following is a patch I proposed
for CGI-modules.  It seems to get rid of the warnings and allow CGI-modules
to work as it should.

I haven't recieved a reply, but since I sent it only last week that's not
unexpected.  

Corrections and/or comments appreciated.  Particularly if I've misunderstood
what's really causing this.

  Michael
  
P.S. thanks for all the testing.

------- Forwarded Message

To: [EMAIL PROTECTED]
Subject: CGI-modules - stop the warnings patch
Date: Thu, 27 Dec 2001 06:01:29 +0100

[... message body ...]

I propose the following patch which mindlessly qulifies everything as
CORE::read since that seems to be the correct intention.  

- --- CGI-modules-2.76/CGI/BasePlus.pm.orig     Sun Dec 30 12:15:46 2001
+++ CGI-modules-2.76/CGI/BasePlus.pm    Sun Dec 30 12:22:05 2001
@@ -62,7 +62,7 @@
        $boundary = "--$boundary";
        # Read the topmost (boundary) line plus the CRLF
        my($null) = '';
- -     $length -= read($IN,$null,length($boundary)+2,0);
+       $length -= CORE::read($IN,$null,length($boundary)+2,0);
     } else { # otherwise we find it ourselves
        my($old);
        ($old,$/) = ($/,$CRLF); # read a CRLF-delimited line
@@ -178,7 +178,7 @@
     $bytesToRead = $self->{LENGTH} if $self->{LENGTH} < $bytesToRead;
 
     # Try to read some data.  We may hang here if the browser is screwed up.  
- -    my $bytesRead = read($self->{IN},$self->{BUFFER},$bytesToRead,$bufferLength);
+    my $bytesRead = 
+CORE::read($self->{IN},$self->{BUFFER},$bytesToRead,$bufferLength);
 
     # An apparent bug in the Netscape Commerce server causes the read()
     # to return zero bytes repeatedly without blocking if the
- --- CGI-modules-2.76/CGI/Base.pm.orig Sun Dec 30 12:15:46 2001
+++ CGI-modules-2.76/CGI/Base.pm        Sun Dec 30 12:22:53 2001
@@ -467,11 +467,11 @@
     alarm($timeout || 60);     # Alarm set. No handler, just die, HACK
 
     $contlen = 0 if $contlen < 0; # weird server/client bug fix
- -    my $readlen = read(STDIN, $CGI::Base::ENTITY_BODY, $contlen);
+    my $readlen = CORE::read(STDIN, $CGI::Base::ENTITY_BODY, $contlen);
 
     if ($read_entity_body_extra) { # normally false, see top of file
        my $dummy = ''; # the read will block if nothing to read!
- -     $dummy = read(STDIN, $dummy, $read_entity_body_extra);
+       $dummy = CORE::read(STDIN, $dummy, $read_entity_body_extra);
        $self->log("read $readlen bytes extra");
     }
     alarm(0);                  # Alarm reset.
@@ -863,7 +863,7 @@
     my($self, $svr_fh) = @_;
     # Pass back the results as fast as possible (may be binary data)
     my($bytes, $len, $buf) = (0,0,'');
- -    while ($len = read($svr_fh, $buf, 1024)) {
+    while ($len = CORE::read($svr_fh, $buf, 1024)) {
        print $buf;
        last if $SigPipe;
        $bytes += $len;

------- End of Forwarded Message

Reply via email to