Hi. I'm working on releasing an update to Net-Patricia, and I needed to make AF_INET6 from the Socket6 space appear as an exported symbol when Net::Patricia loads. I currently do this as:
... package Net::Patricia; use strict; use warnings; require 5.6.0; use version; use Carp; use vars qw($VERSION @ISA @EXPORT); use Socket qw(AF_INET inet_aton inet_ntoa); use Socket6 qw(AF_INET6 inet_pton inet_ntop); BEGIN { require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); @EXPORT = qw(AF_INET AF_INET6); } '$Revision: 1.15_05 $' =~ m/(\d+)\.(\d+)(_\d+|)/ && ( $VERSION = "$1.$2$3"); ... in Patricia.pm. However, building this and loading it causes: Nov 16 14:44:58 mail mimedefang-multiplexor[15764]: Slave 1 stderr: Prototype mismatch: sub main::AF_INET6 () vs none at /usr/lib/perl5/5.10.0/Exporter.pm line 66.#012 at /etc/mail/mimedefang-filter line 1479 in Mimedefang, which imports Net::Patricia 1.15_05 in mimedefang-filter ... What am I missing? I'm trying to have Net::Patricia put AF_INET6 (and AF_INET) into the importing module's namespace so that they don't need to be bothered by the chain-of-dependencies of Net::Patricia. Is there a clean way to do this? Thanks, -Philip