Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: IPV6 Errors with IO::Socket

by jZed (Prior)
on Feb 02, 2017 at 22:51 UTC ( [id://1180893]=note: print w/replies, xml ) Need Help??


in reply to Re^3: IPV6 Errors with IO::Socket
in thread IPV6 Errors with IO::Socket

OK, thanks old friend, your question prompted me to look at what calls what and here's the deal: XML::Feed calls LWP::UserAgent which, in the case of https searches, calls IO::Socket::SSL which calls IO::Socket::INET6 unless it's told not to or it can't find IO::Socket::INET6 in which case it uses IO::Socket:INET which is what I apparently want. So I need to figure out how I can tell it that from up before I call XML::Feed. So I tried removing IO::Socket::INET6 from @INC in a BEGIN block, but I still get the errors ... will report back as I find out more.

Replies are listed 'Best First'.
Re^5: IPV6 Errors with IO::Socket
by Corion (Patriarch) on Feb 03, 2017 at 07:17 UTC

    Looking at the documentation of IO::Socket::SSL, it says

    Alternatively you can enforce IPv4 globally by loading IO::Socket::SSL with the option 'inet4', in which case it will use the IPv4 only class IO::Socket::INET as the super class.

    So, maybe the following works:

    #!perl -w use strict; use IO::Socket::SSL 'inet4'; use XML::Feed;

    (I only knew to look there from having seen a presentation by noxxi on this topic)

      Sweet! Seven runs with no errs so far. I think that is exactly what I needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found