Parano...:Socket(3pm)

πŸ“¦
version 2.10 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Paranoid::Network::Socket β€” a Socket wrapper for seemless IPv6 support ✨

(also, hi, you're reading the user-contributed Perl documentation for it, and the manpage name on the tin is Parano...:Socket(3pm) β€” the file gets truncated like that, it's just how it is 🫢)


🌸 VERSION 🌸

$Id: lib/Paranoid/Network/Socket.pm, 2.10 2022/03/08 00:01:04 acorliss Exp $

✨ SYNOPSIS ✨

# use Socket; # no longer needed
use Paranoid::Network::Socket;
use Paranoid::Network::Socket qw(:crlf);

$ipv6_enabled = has_ipv6();

okay bestie look at that first line β€” you literally do not need to use Socket anymore, she handles it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this module is a wrapper for Socket(3) and Socket6(3), and the whole point is you use this instead of reaching for those two directly. Doing that? Removes all the version-dependent drama around Perl and its bundled Socket(3) when IPv6 is in the picture. no cap. 😭

Here's the timeline tea: starting in Perl 5.12 the beginnings of IPv6 support started peeking out in the bundled Socket(3) module, but full IPv6 support didn't actually arrive until 5.14. Any Perl before that had to use the external Socket6(3) module (which lives on CPAN, iykyk).

With this module, IPv6 support β€” if available β€” gets brought in automatically at runtime, no matter where that support is coming from. It also makes a default export of inet_pton and inet_ntop, which Socket(3) only does on request. iconic behavior honestly πŸ‘‘

And finally, this module gives you a has_ipv6 function that returns whether your Perl has full IPv6 support. Full support is determined by the presence of sockaddr_in6. that's the vibe check right there πŸ’–

All of the regular tag sets provided by either Socket module are supported by this module. all of them. periodt.


πŸŽ€ IMPORT LISTS πŸŽ€

This module exports the following symbols by default:

has_ipv6 @Socket::EXPORT

The following specialized import lists also exist:

List        Members
--------------------------------------------------------
all         @defaults @Socket::EXPORT_OK
NOTE: As a substitute for using Socket directly, this also passes on all the specialized targets of that module.

like, she's not just standing in for Socket β€” she's forwarding the whole group chat πŸ“±βœ¨


πŸ’… SUBROUTINES/METHODS πŸ’…

has_ipv6

$ipv6_enabled = has_ipv6();

Returns a boolean value denoting whether or not this module has full IPv6 support. so basically: does your Perl have the full IPv6 situation or not, yes/no, slay πŸ’œ


πŸ“ DEPENDENCIES πŸ“

  • Socket
  • Socket6 (optional)

(only the second one's optional, bestie β€” Socket is ride or die 🫢)


πŸ’€ BUGS AND LIMITATIONS πŸ’€

...crickets πŸ¦— nothing listed here, bestie. the section exists, the bugs do not. we love a clean slate ✨


πŸ‘‘ AUTHOR πŸ‘‘

Arthur Corliss (corliss@digitalmages.com)


This software is free software. Similar to Perl, you can redistribute it and/or modify it under the terms of either:

  1. the GNU General Public License <https://www.gnu.org/licenses/gpl-1.0.html> as published by the Free Software Foundation <http://www.fsf.org/>; either version 1 <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
  2. the Artistic License 2.0 <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: No trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. However, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)


and that's the whole page, bestie πŸ₯Ή this was perl v5.38.2, dated 2024-03-07, and the manpage answers to Parano...:Socket(3pm) β€” go forth and have a fully IPv6-enabled main character day πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from