NAME
Net::Hacky::Detect::IP - Hackily try different methods of attaining local system IPs
WARNING
This module currently only supports ipv4 and linux, BSD and MAC. Windows support is partially built in, and will be added shortly, unfortunatly I lack a machine to develop it on at present. This module will also eventually check and return valid IPv6 addresses.
README
I am working on a lot cleaner version of this module, that uses the detected OS and acts from there, however I do not havea access to a vast amount of machines, if you would like to help me, please read 'Bugs' and use the corrosponding tracker, to submit: Your OS, What binaries are on the system for showing ip information, the output of the command, the output of 'uname -a' and any other relevant data.
VERSION
Version 0.012
SYNOPSIS
use Net::Hacky::Detect::IP;
my @ips = Net::Hacky::Detect::IP->scan();
DESCRIPTION
Hackily concatenate output from multiple system commands then attempt to find valid ips from it, once found they are tested for connectability then returned. This is not pretty nor very clever but extracting system ips is a nightmare however you go about it and this method appears to be the more reliable.
METHODS
scan
Attempt to find local system ips, returns a list of [] if nothing found.
INTERNAL METHODFS
_checkIPv4
Check an IPv4 is valid and usable, takes 2 mandatory arguments;
a '4' or '6' to designate an IPv4 or IPv6 address and the host its self as an ip not hostname.
AUTHOR
Paul G Webster, <daemon at cpan.org>
BUGS
Please report any bugs or feature requests through the authors code repository at c<https://gitlab.com/paul-g-webster/PL-Net-Hacky-Detect-IP>
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Net::Hacky::Detect::IP
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2017 Paul G Webster.
This program is distributed under the (Simplified) BSD License: http://www.opensource.org/licenses/BSD-2-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.