Subject: | Empty-string LocalAddr not handled as with IO::Socket::INET |
While porting HTTP::Daemon from IO::Socket::INET to IO::Socket::IP I found that IO::Socket::IP->new(LocalAddr=>q{}) behaves differently from IO::Socket::INET:
$ perl -MIO::Socket::INET -e '$a=IO::Socket::INET->new(Proto=>q{tcp}, Listen=>1, LocalAddr=>q{}) or die qq{Error: $@\n}; print `ss -tnlp`'
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:22 *:*
LISTEN 0 1 *:37341 *:* users:(("perl",pid=12918,fd=3))
LISTEN 0 128 :::22 :::*
$ perl -MIO::Socket::IP -e '$a=IO::Socket::IP->new(Proto=>q{tcp}, Listen=>1, LocalAddr=>q{}) or die qq{Error: $@\n}; print `ss -tnlp`'
Error: Name or service not known
It looks like IO::Socket::INET handles empty string as an unspecified address.
Would it be possible to change IO::Socket::IP support this specific value similarly to improve compatibility with IO::Socket::INET?