DNS::Oterica::Location - a location at which hosts may reside


DNS-Oterica documentation Contained in the DNS-Oterica distribution.

Index


Code Index:

NAME

Top

DNS::Oterica::Location - a location at which hosts may reside

VERSION

Top

version 0.100001

OVERVIEW

Top

Locations are network locations where hosts may be found. They represent unique IP ranges with unique names.

Like other DNS::Oterica objects, they should be created through the hub.

ATTRIBUTES

Top

name

This is the location's unique name.

network

This is the Net::IP range for the network at this location.

AUTHOR

Top

Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


DNS-Oterica documentation Contained in the DNS-Oterica distribution.

package DNS::Oterica::Location;
BEGIN {
  $DNS::Oterica::Location::VERSION = '0.100001';
}
# ABSTRACT: a location at which hosts may reside
use Moose;

use Net::IP;
use Moose::Util::TypeConstraints;

# TODO: move these to a types library
subtype 'DNS::Oterica::Type::Network'
  => as Object
  => where { $_->isa('Net::IP') };

coerce 'DNS::Oterica::Type::Network'
  => from 'Str'
  => via { Net::IP->new($_) };


has name => (is => 'ro', isa => 'Str', required => 1);


has 'network' => (
  is   => 'ro',
  isa  => 'DNS::Oterica::Type::Network',
  required => 0,
  coerce   => 1,
);

# Do we really want to keep this?
has delegated => (is => 'ro', isa => 'Bool', required => 0, default => 0);

has code => (is => 'ro', isa => 'Str', required => 1);

__PACKAGE__->meta->make_immutable;
no Moose;
1;

__END__