Skip to content

Commit

Permalink
allow new_listener to subscribe multiple topics.
Browse files Browse the repository at this point in the history
  • Loading branch information
clkao committed Apr 6, 2010
1 parent 99fd6a6 commit dd923a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/AnyMQ.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ sub new_listener {
}

my $listener = AnyMQ::Queue->new;
$listener->subscribe(@_) if @_;
if (@_) {
$listener->subscribe($_)
for @_;
}
return $listener;
}

Expand Down

0 comments on commit dd923a0

Please sign in to comment.