From 06d56c048d30ae13b3048ea342e7f06be668d03b Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 17 Jul 2009 17:57:02 +0200 Subject: Updated the listen and unlisten events to use the new 'do' arguments --- lib/POE/Component/Pg.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/POE/Component/Pg.pm b/lib/POE/Component/Pg.pm index 79687da..e61935b 100644 --- a/lib/POE/Component/Pg.pm +++ b/lib/POE/Component/Pg.pm @@ -166,12 +166,12 @@ sub listen { for my $e (keys %listen) { my($r) = grep $_->[0] == $id && $_->[1] eq $e, @{$_[HEAP]{listen}}; if(!$r) { - push @{$_[HEAP]{listen}}, [ $_[SENDER]->ID, $e, $listen{$e} ]; - $_[KERNEL]->refcount_increment($_[SENDER]->ID, 'P:C:PG'); + push @{$_[HEAP]{listen}}, [ $id, $e, $listen{$e} ]; + $_[KERNEL]->refcount_increment($id, 'P:C:PG'); } else { $r->[2] = $listen{$e}; } - $_[KERNEL]->call($_[SESSION], 'do', query => "LISTEN $e"); + $_[KERNEL]->call($_[SESSION], 'do', "LISTEN $e"); } } @@ -185,7 +185,7 @@ sub unlisten { $_[KERNEL]->refcount_decrement($id, 'P:C:PG') if $rm; !$rm; } @{$_[HEAP]{listen}} ]; - $_[KERNEL]->call($_[SESSION], 'do', query => "UNLISTEN $_->[1]") + $_[KERNEL]->call($_[SESSION], 'do', "UNLISTEN $_->[1]") for (grep { my $i = $_; !grep $_->[1] eq $i, @{$_[HEAP]{listen}} } @u); } -- cgit v1.2.3