use 5.006;
use strict;
use warnings;
use Cache::LRU;
use LWP::UserAgent;
use HTTP::Headers;
use JSON;
use Geo::Details;
use Net::CIDR;
use Net::CIDR::Set;
our $VERSION = '3.2.0';
use constant DEFAU
elf->{ua}->default_headers(
HTTP::Headers->new(
Accept => 'application/json',
Authorization => 'Bearer ' . $token
)
);
$self->{ua}->agent("IPinfo
_type =~ m{application/json}i ) {
eval { $info = from_json( $response->decoded_content ); };
if ($@) {
return ( undef, 'Error parsing JSON response.' );
use 5.006;
use strict;
use warnings;
use Cache::LRU;
use LWP::UserAgent;
use HTTP::Headers;
use JSON;
use Geo::DetailsPlus;
use Net::CIDR;
use Net::CIDR::Set;
our $VERSION = '3.2.0';
use constant D
/Perl/3.2.0' );
$header->header( 'Accept' => 'application/json' );
$header->header( 'Content-Type' => 'application/json' );
if ($token) {
$header->header( 'Authorization' =>
_type =~ m{application/json}i ) {
eval { $info = from_json( $response->decoded_content ); };
if ($@) {
return ( undef, 'Error parsing JSON response.' );
use 5.006;
use strict;
use warnings;
use Cache::LRU;
use LWP::UserAgent;
use HTTP::Headers;
use JSON;
use Geo::DetailsLite;
use Net::CIDR;
use Net::CIDR::Set;
our $VERSION = '3.2.0';
use constant D
elf->{ua}->default_headers(
HTTP::Headers->new(
Accept => 'application/json',
Authorization => 'Bearer ' . $token
)
);
$self->{ua}->agent("IPinfo
_type =~ m{application/json}i ) {
eval { $info = from_json( $response->decoded_content ); };
if ($@) {
return ( undef, 'Error parsing JSON response.' );
;
bless $self, $class;
return $self;
}
sub TO_JSON {
my ($self) = @_;
# Return a copy of the object as a hash reference for JSON encoding
return {%$self};
}
sub ip {
return
lain string. It defaults to an empty string if not provided.
=head2 TO_JSON
This method is used to convert the object to a JSON representation.
=head2 ip
my $ip_address = $geo_details->ip();
reference
my $self = { $key => $data };
bless $self, $class;
return $self;
}
sub TO_JSON {
my ($self) = @_;
return {%$self};
}
sub ip { return $_[0]->{ip}; }
sub geo { return $_
use 5.006;
use strict;
use warnings;
use Cache::LRU;
use LWP::UserAgent;
use HTTP::Headers;
use JSON;
use Geo::DetailsCore;
use Net::CIDR;
use Net::CIDR::Set;
our $VERSION = '3.2.0';
use constant D
/Perl/3.2.0' );
$header->header( 'Accept' => 'application/json' );
$header->header( 'Content-Type' => 'application/json' );
if ($token) {
$header->header( 'Authorization' =>
_type =~ m{application/json}i ) {
eval { $info = from_json( $response->decoded_content ); };
if ($@) {
return ( undef, 'Error parsing JSON response.' );
reference
my $self = { $key => $data };
bless $self, $class;
return $self;
}
sub TO_JSON {
my ($self) = @_;
return {%$self};
}
sub ip { return $_[0]->{ip}; }
sub hostname { retu
;
bless $self, $class;
return $self;
}
sub TO_JSON {
my ($self) = @_;
# Return a copy of the object as a hash reference for JSON encoding
return {%$self};
}
sub abuse {
retu
lain string. It defaults to an empty string if not provided.
=head2 TO_JSON
This method is used to convert the object to a JSON representation.
=head2 abuse
my $abuse_email = $geo_details->abu