Addr-MyIP

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

{
   "abstract" : "Get your public facing IPv4 or IPv6 address",
   "author" : [
      "Steve Bertrand <steveb@cpan.org>"
   ],
   "dynamic_config" : 1,
   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
   "license" : [
      "artistic_2"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'Get your public facing IPv4 or IPv6 address'
author:
  - 'Steve Bertrand <steveb@cpan.org>'
build_requires:
  ExtUtils::MakeMaker: '0'
  Hook::Output::Tiny: '0'
  Mock::Sub: '0'
  Test::More: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 1

bin/myip.pod  view on Meta::CPAN

=head1 NAME

myip - Get your public IPv4 or IPv6 address

=for html
<a href="https://github.com/stevieb9/addr-myip/actions"><img src="https://github.com/stevieb9/addr-myip/workflows/CI/badge.svg"/></a>
<a href='https://coveralls.io/github/stevieb9/addr-myip?branch=main'><img src='https://coveralls.io/repos/stevieb9/addr-myip/badge.svg?branch=main&service=github' alt='Coverage Status' /></a>

=head1 DESCRIPTION

Command line utility to get and display your public IPv4 or IPv6 address.

=head1 USAGE

    # Display IPv4 address

    myip

    # Display IPv6 address (if available)

    myip 6

lib/Addr/MyIP.pm  view on Meta::CPAN

    return $response->{content};
}

sub __placeholder {}

1;
__END__

=head1 NAME

Addr::MyIP - Get your public facing IPv4 or IPv6 address

=for html
<a href="https://github.com/stevieb9/addr-myip/actions"><img src="https://github.com/stevieb9/addr-myip/workflows/CI/badge.svg"/></a>
<a href='https://coveralls.io/github/stevieb9/addr-myip?branch=main'><img src='https://coveralls.io/repos/stevieb9/addr-myip/badge.svg?branch=main&service=github' alt='Coverage Status' /></a>

=head1 SYNOPSIS

    use Addr::MyIP;

    my $ipv4_addr = myip();
    my $ipv6_addr = myip6();

=head1 DESCRIPTION

For end-users, please review the
L<documentation|https://metacpan.org/pod/distribution/Addr-MyIP/bin/myip.pod> for
the L<myip|https://metacpan.org/pod/distribution/Addr-MyIP/bin/myip.pod>
program that we've installed for you as part of this distribution.

This software uses the B<api[64].ipify.org> website to fetch your public IP
address. We do this in as small and tight a package as we can.

=head1 FUNCTIONS

There are only two functions we provide, both exported into your namespace by
default.

=head2 myip

Returns a string containing your IPv4 address. If one isn't found, we'll return



( run in 0.293 second using v1.01-cache-2.11-cpan-64827b87656 )