Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I've just extended my Net::CIDR::Lookup module with an IPv6 version and am seeing a lot of failed tests form CPANtesters. Clearly an oversight: I just assumed Socket would nowadays always export unpack_sockaddr_in6 and the like. This needs fixing but there's two things I'm not clear about:

  1. Is there a halfway easy way nowadays to find the oldest version of a module that supports a certain feature in the first place? Searching around here I found a half-decade-old thread that mentions it's a tedious process, but I knew that already :) Basically bisecting one's way through every version on BackPAN should be rather straightforward, maybe someone has written some code for it already?
  2. Now I think the IPv6-Socket problem may even be a bit more complicated as e.g. unpack_sockaddr_in6 will only actually be functional if the system had IPv6 support at XS compile time, otherwise it's there but croaks when called. I'm quite sure ExtUtils::MakeMaker has no way of checking a prerequisite for anything else but a version number, but maybe something like Module::Build does? I haven't found anything like it in the docs but I suppose something like this would make sense---a sub instead of a version that just returns a boolean indicating whether the installed version is acceptable:
    PREREQ_PM => { 'Bit::Vector' => 0, Socket => sub { eval { Socket::unpack_sockaddr_in6("\xa".("\0"x22)."\x01\0\0\ +0\0"); 1; } or do { $@ and return 0; } } },

In reply to How to require IPv6 support by mbethke

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [belg4mit]: Nothing wrong with perl -le 'print ":)" =~ /(?^u:^(\:|\:\))$) /'
    [Lotus1]: belg4mit are you on a Linix server?
    [belg4mit]: yes. the regular expression is generated in code from a text file. that s the regular expression that Perl blows up when it reaches it, but if I use it from the comman line it's fine
    [belg4mit]: oh, wait, damn, different lne number
    [choroba]: same Perl version?
    [choroba]: oh, ok
    [belg4mit]: I had \Q'd in one RE but not a subsequent one, doh
    [talexb]: Programs writing programs. Neat stuff.

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (13)
    As of 2017-04-25 16:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      I'm a fool:











      Results (460 votes). Check out past polls.