use Errno;
@ISA = qw(IO::Socket);
-$VERSION = "1.34";
+$VERSION = "1.35";
my $EINVAL = exists(&Errno::EINVAL) ? Errno::EINVAL() : 1;
return undef unless defined $name;
return $proto_number{$name} if exists $proto_number{$name};
- my @proto = getprotobyname($name);
+ my @proto = eval { getprotobyname($name) };
return undef unless @proto;
_cache_proto(@proto);
return undef unless defined $num;
return $proto_name{$num} if exists $proto_name{$num};
- my @proto = getprotobynumber($num);
+ my @proto = eval { getprotobynumber($num) };
return undef unless @proto;
_cache_proto(@proto);