Hi,
I am testing the Apache::Echo connection handler for Apache2 and mod_perl 2.
But encounter the following error:

[Thu Apr 25 15:32:15 2002] [error] failed to resolve handler `Apache::Echo'
[Thu Apr 25 15:32:15 2002] [error] Bareword "Apache::OK" not allowed while
"strict subs" in use at C:\Apache2/blib/lib/Apache2/Apache/Echo.pm line 25.
Compilation failed in require at (eval 2) line 3.

What do I miss?

--Steve

--
package Apache::Echo;
 
 use strict;
 use Apache::Connection ();
 use APR::Socket ();
 
 use constant BUFF_LEN => 1024;
 
 sub handler {
     my Apache::Connection $c = shift;
     my APR::Socket $socket = $c->client_socket;
 
     my $buff;
 
     for (;;) {
         my($rlen, $wlen);
         my $rlen = BUFF_LEN;
         $socket->recv($buff, $rlen);
         last if $rlen <= 0;
         $wlen = $rlen;
         $socket->send($buff, $wlen);
         last if $wlen != $rlen;
     }
 
     return Apache::OK;
 }
 
 1;
 __END__
 
  Steve Lihn
  FIS Database Support, Merck & Co., Inc.
  Tel: (908) 423 - 4441





------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of 
Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, 
proprietary copyrighted and/or legally privileged, and is intended solely for the use 
of the individual or entity named in this message.  If you are not the intended 
recipient, and have received this message in error, please immediately return this by 
e-mail and then delete it.

==============================================================================

Reply via email to