Data::Semantic::Net::IPAddress - Base class for IP address semantic data classes


Data-Semantic-Net documentation Contained in the Data-Semantic-Net distribution.

Index


Code Index:

NAME

Top

Data::Semantic::Net::IPAddress - Base class for IP address semantic data classes

VERSION

Top

version 1.101760

DESCRIPTION

Top

This class is a base class for semantic data objects representing IP addresses - IPv4 and IPv6.

METHODS

Top

is_valid_normalized_value

FIXME

INSTALLATION

Top

See perlmodinstall for information and options on installing Perl modules.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests through the web interface at http://rt.cpan.org.

AVAILABILITY

Top

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see http://search.cpan.org/dist/Data-Semantic-Net/.

The development version lives at http://github.com/hanekomu/Data-Semantic-Net/. Instead of sending patches, please fork this project using the standard git and github infrastructure.

AUTHOR

Top

  Marcel Gruenauer <marcel@cpan.org>

COPYRIGHT AND LICENSE

Top


Data-Semantic-Net documentation Contained in the Data-Semantic-Net distribution.

use 5.008;
use strict;
use warnings;

package Data::Semantic::Net::IPAddress;
BEGIN {
  $Data::Semantic::Net::IPAddress::VERSION = '1.101760';
}
# ABSTRACT: Base class for IP address semantic data classes
use parent qw(Data::Semantic::Net);
__PACKAGE__
    ->mk_abstract_accessors(qw(is_internal))
    ->mk_boolean_accessors(qw(forbid_internal));

sub is_valid_normalized_value {
    my ($self, $value) = @_;
    return unless $self->SUPER::is_valid_normalized_value($value);
    $self->forbid_internal ? !$self->is_internal($value) : 1;
}

1;


__END__