Subject: | Wrong error handler in example manager-test.pl |
Date: | Fri, 14 Dec 2007 15:23:33 +0100 |
To: | bug-asterisk-perl [...] rt.cpan.org |
From: | Sascha Herrmann <s.herrmann [...] nttcable.de> |
The example script manager-test.pl uses the line
$astman->connect || die $astman->error . "\n";
to connect to the server, which suggests that the connect function will
return false in case of an error. But when connecting to an server which
dosn't send the Asterisk-Manager header it will return an error message
with 'return $self->error("Unknown Protocol\n");', which isn't fetched
by the test. Due to this the script will send the warning 'Use of
uninitialized value in <HANDLE>' in an endless loop.