get all the debugging finally into the debug files when things go wrong
[spider.git] / perl / Msg.pm
index b626e27c67958eb9822f12491298d349094c31c4..f5704a81e46eb237403f695383e7bd3307770dbf 100644 (file)
 
 package Msg;
 
-require Exporter;
-@ISA = qw(Exporter);
-
 use strict;
 use IO::Select;
 use IO::Socket;
-use Carp;
+#use DXDebug;
 
-use vars qw (%rd_callbacks %wt_callbacks $rd_handles $wt_handles);
+use vars qw(%rd_callbacks %wt_callbacks $rd_handles $wt_handles);
 
 %rd_callbacks = ();
 %wt_callbacks = ();
@@ -89,7 +86,7 @@ sub _enqueue {
     my ($conn, $msg) = @_;
     # prepend length (encoded as network long)
     my $len = length($msg);
-       $msg =~ s/(\x00-\x2f\x7e-\xff%])/sprintf("%%%02X", ord($1))/eg; 
+       $msg =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg; 
     push (@{$conn->{queue}}, $msg . "\n");
 }