From 15eef5072cad335e6e71f36f4fe4faeb94968b9e Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Sun, 20 Jul 2014 13:43:00 +0100 Subject: [PATCH] Accept error_cb parameter on Connection new() Signed-off-by: Pedro Melo --- lib/AnyEvent/NSQ/Connection.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AnyEvent/NSQ/Connection.pm b/lib/AnyEvent/NSQ/Connection.pm index 7f53be5..22535b7 100644 --- a/lib/AnyEvent/NSQ/Connection.pm +++ b/lib/AnyEvent/NSQ/Connection.pm @@ -41,7 +41,7 @@ sub new { $self->{host} = delete $args{host} or croak q{FATAL: required 'host' parameter is missing}; $self->{port} = delete $args{port} or croak q{FATAL: required 'port' parameter is missing}; - for my $p (qw( client_id hostname connect_cb )) { + for my $p (qw( client_id hostname connect_cb error_cb )) { $self->{$p} = delete $args{$p} if exists $args{$p} and defined $args{$p}; }