Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to handle Net::Address::IP::Local'->public when we are not connected to internet

by sundialsvc4 (Abbot)
on Jan 20, 2015 at 00:42 UTC ( [id://1113819]=note: print w/replies, xml ) Need Help??


in reply to How to handle Net::Address::IP::Local'->public when we are not connected to internet

I (still ...) strongly suspect that you are seeing the error-message because of print $@;.   Therefore, I specifically suggest that you should modify the if/else structure in more or less this way:

if ($@) { print STDERR "An exception was caught!\n"; # (set the default IP-address here, etc ...) } else { print STDERR "An exception did not occur.\n" # ( grab the real address here) } print STDERR "... so the IP-address is $ipaddr\n"; # (etc. etc ...)
In other words, cause the code to explicitly log what it’s doing, one way or the other, to remove all doubt as to what it is doing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-23 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found