Acme-Free-API-Geodata-GeoIP

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "ExtUtils::MakeMaker" : "0"
         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Data::Dumper" : "0",
            "JSON::XS" : "4",
            "WWW::Mechanize" : "2"
         }
      }
   },
   "release_status" : "stable",
   "version" : "1.0",
   "x_serialization_backend" : "JSON::PP version 4.16"
}

META.yml  view on Meta::CPAN

license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Acme-Free-API-Geodata-GeoIP
no_index:
  directory:
    - t
    - inc
requires:
  Data::Dumper: '0'
  JSON::XS: '4'
  WWW::Mechanize: '2'
version: '1.0'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

use 5.038002;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'Acme::Free::API::Geodata::GeoIP',
    VERSION_FROM      => 'lib/Acme/Free/API/Geodata/GeoIP.pm', # finds $VERSION, requires EU::MM from perl >= 5.5
    PREREQ_PM         => {
        "WWW::Mechanize" => 2.0,
        "JSON::XS" => 4.0,
        "Data::Dumper" => 0,
    },
        "EXE_FILES" => [
        "bin/geoip"
    ],

    ABSTRACT_FROM     => 'lib/Acme/Free/API/Geodata/GeoIP.pm', # retrieve abstract from module
    AUTHOR            => 'Rene Schickbauer <cavac@cpan.org>',
    LICENSE           => 'perl',
);

lib/Acme/Free/API/Geodata/GeoIP.pm  view on Meta::CPAN

package Acme::Free::API::Geodata::GeoIP;

use v5.38;
use strict;
use warnings;
use utf8;

our $VERSION = '1.0';

use Data::Dumper;
use WWW::Mechanize;
use JSON::XS qw(decode_json);

sub new($proto, %config) {
    my $class = ref($proto) || $proto;

    my $self = bless \%config, $class;

    my $agent = WWW::Mechanize->new(cookie_jar => {});
    $agent->agent('PerlMonks contest/1 (https://perlmonks.org/?node_id=11161472)');



( run in 0.497 second using v1.01-cache-2.11-cpan-a5abf4f5562 )