Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vti committed Dec 6, 2010
1 parent 39acf03 commit b71ee6b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions showmetheshell
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ use warnings;

use FindBin;

#use lib "$FindBin::Bin/contrib/reanimator/lib";
use lib "/Users/vti/dev/reanimator/lib";
BEGIN {
use lib "$FindBin::Bin/contrib/protocol-websocket/lib";
use lib "$FindBin::Bin/contrib/event_reactor/lib";
use lib "$FindBin::Bin/contrib/reanimator/lib";
}

use lib 'lib';

#use constant DEBUG => !!$ENV{SHOWMETHESHELL_DEBUG};

#BEGIN {$ENV{EVENT_REACTOR_DEBUG} = 1};

use JSON;
use ReAnimator;
use Terminal;
Expand All @@ -36,10 +37,8 @@ ReAnimator->new(
{type => 'row', row => $row, text => $text}
)
);
warn 'row changed';
},
on_finished => sub {
warn 'terminal is closed';
$self->drop($client);
}
);
Expand All @@ -52,8 +51,6 @@ ReAnimator->new(
sub {
my ($client, $message) = @_;

#warn "Message from client $message" if DEBUG;

my $json = JSON->new;

eval { $message = $json->decode($message); };
Expand All @@ -65,11 +62,10 @@ ReAnimator->new(

my $code = $message->{code};

warn "code=$code";

$terminal->key($code);
}
elsif ($type eq 'action') {
$terminal->move($message->{action});
}
else {
warn "Unknown type '$type'";
Expand Down

0 comments on commit b71ee6b

Please sign in to comment.