I'm the owner/maintainer of Net::Patricia, and I was trying to get ready for a new release.

Since the module can't be used without importing AF_INET and AF_INET6 from Socket and Socket6 respectively, I figured I'd simplify things a bit by having my module export those two symbols directly into the caller.

I did this as:

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); }

You can see the entire file here.

However, when I installed the updated module and tried to use it in production with Mimedefang, I started seeing the following errors:

Nov 16 14:44:58 mail mimedefang-multiplexor[15764]: Slave 1 stderr: Pr +ototype mismatch: sub main::AF_INET6 () vs none at /usr/lib/perl5/5.1 +0.0/Exporter.pm line 66.#012 at /etc/mail/mimedefang-filter line 1479

Odd that this happens for Socket6::AF_INET6 but not for Socket::AF_INET.

Both are implemented nearly identically.

This is holding up a release, and frankly I can't figure it out, after staring at it for the better part of the day.

Like a lot of issues in Perl, it's probably something frustratingly trivial, but I'm not seeing it.

Anyone else think they might have strong mojo?

Thanks.


In reply to Trying to cleanly re-export another Module's export constants by pprindeville

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.