GeoIP2/Model/Domain.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GeoIP2/Model/Country.pm ↑ Summary GeoIP2/Model/ISP.pm »
1 package GeoIP2::Model::Domain;
2 1 $GeoIP2::Model::Domain::VERSION = '0.050000';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use GeoIP2::Types qw( IPAddress Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 with 'GeoIP2::Role::Model::Flat', 'GeoIP2::Role::HasIPAddress';
11  
12 1 has domain => (
13 is => 'ro',
14 isa => Str,
15 predicate => 'has_domain',
16 );
17  
18 1 1;
19  
20 # ABSTRACT: Model class for the GeoIP2 Domain database
21  
22 __END__
23  
24 =pod
25  
26 =head1 NAME
27  
28 GeoIP2::Model::Domain - Model class for the GeoIP2 Domain database
29  
30 =head1 VERSION
31  
32 version 0.050000
33  
34 =head1 SYNOPSIS
35  
36 use 5.008;
37  
38 use GeoIP2::Model::Domain;
39  
40 my $record = GeoIP2::Model::Domain->new(
41 raw => { domain => 'maxmind.com', ip_address => '24.24.24.24'}
42 );
43  
44 say $record->domain();
45  
46 =head1 DESCRIPTION
47  
48 This class provides a model for GeoIP2 Domain.
49  
50 =head1 METHODS
51  
52 This class provides the following methods:
53  
54 =head2 $record->domain()
55  
56 Returns the domain as a string.
57  
58 =head2 $record->ip_address()
59  
60 Returns the IP address used in the lookup.
61  
62 =head1 AUTHORS
63  
64 =over 4
65  
66 =item *
67  
68 Dave Rolsky <drolsky@maxmind.com>
69  
70 =item *
71  
72 Greg Oschwald <goschwald@maxmind.com>
73  
74 =item *
75  
76 Olaf Alders <oalders@maxmind.com>
77  
78 =back
79  
80 =head1 COPYRIGHT AND LICENSE
81  
82 This software is copyright (c) 2014 by MaxMind, Inc..
83  
84 This is free software; you can redistribute it and/or modify it under
85 the same terms as the Perl 5 programming language system itself.
86  
87 =cut
« GeoIP2/Model/Country.pm ↑ Summary GeoIP2/Model/ISP.pm »