| 1 | package GeoIP2::Model::Domain; | ||
| 2 | |||
| 3 | 7 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 7 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 7 | our $VERSION = '2.006000'; | |
| 7 | |||
| 8 | 7 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 7 | ▶ | use GeoIP2::Types qw( IPAddress Str ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 7 | ▶ | use namespace::clean -except => 'meta'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 7 | with 'GeoIP2::Role::Model::Flat', 'GeoIP2::Role::HasIPAddress'; | |
| 15 | |||
| 16 | 7 | has domain => ( | |
| 17 | is => 'ro', | ||
| 18 | isa => Str, | ||
| 19 | predicate => 'has_domain', | ||
| 20 | ); | ||
| 21 | |||
| 22 | 7 | 1; | |
| 23 | |||
| 24 | # ABSTRACT: Model class for the GeoIP2 Domain database | ||
| 25 | |||
| 26 | __END__ | ||
| 27 | |||
| 28 | =pod | ||
| 29 | |||
| 30 | =encoding UTF-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | GeoIP2::Model::Domain - Model class for the GeoIP2 Domain database | ||
| 35 | |||
| 36 | =head1 VERSION | ||
| 37 | |||
| 38 | version 2.006000 | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | use 5.008; | ||
| 43 | |||
| 44 | use GeoIP2::Model::Domain; | ||
| 45 | |||
| 46 | my $domain = GeoIP2::Model::Domain->new( | ||
| 47 | raw => { domain => 'maxmind.com', ip_address => '24.24.24.24'} | ||
| 48 | ); | ||
| 49 | |||
| 50 | print $domain->domain(), "\n"; | ||
| 51 | |||
| 52 | =head1 DESCRIPTION | ||
| 53 | |||
| 54 | This class provides a model for the data returned by the GeoIP2 Domain | ||
| 55 | database. | ||
| 56 | |||
| 57 | =head1 METHODS | ||
| 58 | |||
| 59 | This class provides the following methods: | ||
| 60 | |||
| 61 | =head2 $domain->domain() | ||
| 62 | |||
| 63 | Returns the domain as a string. | ||
| 64 | |||
| 65 | =head2 $domain->ip_address() | ||
| 66 | |||
| 67 | Returns the IP address used in the lookup. | ||
| 68 | |||
| 69 | =head1 SUPPORT | ||
| 70 | |||
| 71 | =head1 AUTHORS | ||
| 72 | |||
| 73 | =over 4 | ||
| 74 | |||
| 75 | =item * | ||
| 76 | |||
| 77 | Dave Rolsky <drolsky@maxmind.com> | ||
| 78 | |||
| 79 | =item * | ||
| 80 | |||
| 81 | Greg Oschwald <goschwald@maxmind.com> | ||
| 82 | |||
| 83 | =item * | ||
| 84 | |||
| 85 | Mark Fowler <mfowler@maxmind.com> | ||
| 86 | |||
| 87 | =item * | ||
| 88 | |||
| 89 | Olaf Alders <oalders@maxmind.com> | ||
| 90 | |||
| 91 | =back | ||
| 92 | |||
| 93 | =head1 COPYRIGHT AND LICENSE | ||
| 94 | |||
| 95 | This software is copyright (c) 2013 - 2018 by MaxMind, Inc. | ||
| 96 | |||
| 97 | This is free software; you can redistribute it and/or modify it under | ||
| 98 | the same terms as the Perl 5 programming language system itself. | ||
| 99 | |||
| 100 | =cut | ||