Paranoid::Network::Socket(3pm)

Paranoid::Network::Socket3pm

Socket wrapper for seemless ipv6 support

Usage

  # use Socket; # no longer needed
  use Paranoid::Network::Socket;
  use Paranoid::Network::Socket qw(:crlf);
  $ipv6_enabled = has_ipv6();

Version

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

Overview

This module is a wrapper for Socket(3) and Socket6(3), and is meant to be used in lieu of using those packages directly. Doing so removes any of the version dependent support issues on Perl and its bundled Socket(3) where IPv6 is concerned.

Starting in Perl 5.12 the beginnings of IPv6 support emerged in the bundled Socket(3) module, but full IPv6 support didn't arrive until 5.14. Prior versions of Perl required the use of the external Socket6(3) module (available on CPAN).

With this module IPv6 support, if available, is brought in automatically at runtime, regardless of where that support is provided. It also makes a default export of inet_pton and inet_ntop, something that Socket(3) only does on request.

Finally, this module provides a has_ipv6 function which will return whether your Perl has full IPv6 support. Full support is determined by the presence of sockaddr_in6.

All of the regular tag sets provided by either Socket modules are supported by this module.

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.

Subroutines/methods

has_ipv6

    $ipv6_enabled = has_ipv6();

Returns a boolean value denoting whether or not this module has full IPv6 support.

Dependencies

o

Socket

o

Socket6 (optional)

Bugs and limitations

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Arthur Corliss ([email protected])

From libparanoid-perl 2.10-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.