-
-
17 May 2022 15:23:48 UTC
- Distribution: Addr-MyIP
- Module version: 0.05
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (225 / 0 / 0)
- Kwalitee
Bus factor: 1- 95.45% Coverage
- License: artistic_2
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (4.53KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- HTTP::Tiny
- IO::Socket::SSL
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Addr::MyIP - Get your public facing IPv4 or IPv6 address
SYNOPSIS
use Addr::MyIP; my $ipv4_addr = myip(); my $ipv6_addr = myip6();
DESCRIPTION
For end-users, please review the documentation for the myip program that we've installed for you as part of this distribution.
This software uses the api[64].ipify.org website to fetch your public IP address. We do this in as small and tight a package as we can.
FUNCTIONS
There are only two functions we provide, both exported into your namespace by default.
myip
Returns a string containing your IPv4 address. If one isn't found, we'll return an empty string.
myip6
Returns a string containing your IPv6 address if available. If one isn't found, we'll return an empty string.
AUTHOR
Steve Bertrand,
<steveb at cpan.org>
LICENSE AND COPYRIGHT
Copyright 2022 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
Module Install Instructions
To install Addr::MyIP, copy and paste the appropriate command in to your terminal.
cpanm Addr::MyIP
perl -MCPAN -e shell install Addr::MyIP
For more information on module installation, please visit the detailed CPAN module installation guide.