Skip to content

Commit

Permalink
Don't assume handle is named handle.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanwh authored and rcaputo committed Mar 5, 2011
1 parent fb03bf2 commit 49fbf78
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/Reflex/Role/Streaming.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ role {
my $method_read = "_on_${h}_readable"; my $method_read = "_on_${h}_readable";
my $method_put = $p->method_put(); my $method_put = $p->method_put();


my $method_writable = "_on_${h}_writable"; my $method_writable = "_on_${h}_writable";
my $internal_flush = "_do_${h}_flush"; my $internal_flush = "_do_${h}_flush";
my $internal_put = "_do_${h}_put"; my $internal_put = "_do_${h}_put";
my $pause_writable = "_pause_${h}_writable"; my $pause_writable = "_pause_${h}_writable";
my $resume_writable = "_resume_${h}_writable"; my $resume_writable = "_resume_${h}_writable";
my $stop_handle_readable = "stop_${h}_readable";
my $stop_handle_writable = "stop_${h}_writable";


with 'Reflex::Role::Collectible'; with 'Reflex::Role::Collectible';


Expand Down Expand Up @@ -73,8 +75,8 @@ role {
# Multiplex a single stop() to the sub-roles. # Multiplex a single stop() to the sub-roles.
method $p->method_stop() => sub { method $p->method_stop() => sub {
my $self = shift; my $self = shift;
$self->stop_handle_readable(); $self->$stop_handle_readable();
$self->stop_handle_writable(); $self->$stop_handle_writable();
}; };


method $method_put => sub { method $method_put => sub {
Expand Down

0 comments on commit 49fbf78

Please sign in to comment.