Skip to content

Socket::getaddrinfo can now fail without returning error #221

@Yaribz

Description

@Yaribz

This code performs an invalid call to Socket::getaddrinfo (invalid value for socktype parameter):

use Socket qw'getaddrinfo';

my ($err)=getaddrinfo('perl.org', 80, {socktype => -1});
die "getaddrinfo error: $err\n" if($err);
print "OK.\n";

$err is supposed to contain an error message in this case, as seen in the result with Strawberry Perl 5.38.2.2 64bit:

getaddrinfo error: La prise en charge du type de socket spécifié n'existe pas dans cette famille d'adresses.

But the result with Strawberry Perl 5.40.0.1 64bit is:

OK.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions