summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-17 17:57:02 +0200
committerYorhel <git@yorhel.nl>2009-07-17 17:57:02 +0200
commit06d56c048d30ae13b3048ea342e7f06be668d03b (patch)
treef6c981a0d478031658d293a2562c351c953bb14b
parentf292b4b22df4b035de00e72a0c135e0e5756ece2 (diff)
Updated the listen and unlisten events to use the new 'do' arguments
-rw-r--r--lib/POE/Component/Pg.pm8
1 files changed, 4 insertions, 4 deletions
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);
}