change our to use vars
[spider.git] / perl / DXChannel.pm
index aae692efb52e4f31230c0b04b118765ee3236775..3b3ac62f13b84e193c0ff661981d3ba3a7981616 100644 (file)
@@ -426,6 +426,7 @@ sub disconnect
        my $self = shift;
        my $user = $self->{user};
        
+       main::clean_inqueue($self);          # clear out any remaining incoming frames
        $user->close() if defined $user;
        $self->{conn}->disconnect;
        $self->del();
@@ -626,7 +627,6 @@ sub broadcast_list
 #no strict;
 sub AUTOLOAD
 {
-       my $self = shift;
        no strict;
        my $name = $AUTOLOAD;
        return if $name =~ /::DESTROY$/;
@@ -637,9 +637,7 @@ sub AUTOLOAD
        # this clever line of code creates a subroutine which takes over from autoload
        # from OO Perl - Conway
        *$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}};
-       &$AUTOLOAD($self, @_);
-#      *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
-#    @_ ? $self->{$name} = shift : $self->{$name} ;
+        goto &$AUTOLOAD;
 }