Skip to content

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmay committed Jul 3, 2010
1 parent b49e41c commit 52a1c21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/App/Termcast/Handle.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ App::Termcast::Handle -
=cut

has session_id => (
has handle_id => (
is => 'ro',
isa => 'Str',
required => 1,
Expand Down
32 changes: 16 additions & 16 deletions lib/App/Termcast/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ sub _build_termcast_guard {

if ($fatal) {
weaken(my $weakself = $self);
$weakself->delete_termcast_session($h->session_id);
$weakself->delete_termcast_handle($h->handle_id);
}
else {
warn $error;
}
},
session_id => new_uuid_string(),
handle_id => new_uuid_string(),
);
my $cv = AnyEvent->condvar;
my $user_object;
Expand All @@ -101,7 +101,7 @@ sub _build_termcast_guard {

$h->session($session);

$self->set_termcast_session($h->session_id => $h);
$self->set_termcast_handle($h->handle_id => $h);
}
},
);
Expand Down Expand Up @@ -161,9 +161,9 @@ sub _build_server_guard {
}
}
);
my $session_id = new_uuid_string();
my $handle_id = new_uuid_string();

$self->set_server_handle($session_id => $h);
$self->set_server_handle($handle_id => $h);
};
}

Expand All @@ -172,10 +172,10 @@ has termcast_handles => (
isa => 'HashRef',
traits => ['Hash'],
handles => {
set_termcast_session => 'set',
get_termcast_session => 'get',
delete_termcast_session => 'delete',
termcast_session_ids => 'keys',
set_termcast_handle => 'set',
get_termcast_handle => 'get',
delete_termcast_handle => 'delete',
termcast_handle_ids => 'keys',
},
default => sub { +{} },
);
Expand All @@ -185,10 +185,10 @@ has server_handles => (
isa => 'HashRef',
traits => ['Hash'],
handles => {
set_server_session => 'set',
get_server_session => 'get',
delete_server_session => 'delete',
server_session_ids => 'keys',
set_server_handle => 'set',
get_server_handle => 'get',
delete_server_handle => 'delete',
server_handle_ids => 'keys',
},
default => sub { +{} },
);
Expand Down Expand Up @@ -265,9 +265,9 @@ sub handle_server {
map {
+{
session_id => $_,
user => $self->get_termcast_session($_)->user->id,
user => $self->get_termcast_handle($_)->user->id,
}
} $self->termcast_session_ids
} $self->termcast_handle_ids
],
}
);
Expand All @@ -276,7 +276,7 @@ sub handle_server {
return unless $data->{session};

my $session;
return unless $session = $self->get_termcast_session($data->{session});
return unless $session = $self->get_termcast_handle($data->{session});
my $buffer = $session->buffer;

if ($data->{since}) {
Expand Down

0 comments on commit 52a1c21

Please sign in to comment.