Subject: | HTTP::Daemon->new runs daemon on random port |
Distribution: RPC-XML-0.77
Perl version: 5.14.2
OS: Mageia GNU/Linux 2 (x64); kernel 3.3.8
Description:
I tried to pass invalid port 65536. HTTP::Daemon->new(LocalPort =>
65536) opens connection on random port instead of return undef, because
valid ports must be >= 0 and <= 65535.
If you pass port "0", HTTP::Daemon->new(LocalPort => 0) also will return
ref to daemon object opened on random port.
Example:
use HTTP::Daemon;
my $d = HTTP::Daemon->new(LocalPort => 65536) || die;
print "Please contact me at: <URL:", $d->url, ">\n";
Output:
Please contact me at: <URL:http://localhost:52712/>