Sisimai::RFC791(3pm)

NAME
Sisimai::RFC791 - IP related class

SYNOPSIS
    use Sisimai::RFC791;

    my $p = Sisimai::RFC791->find("mx7.example.jp:[192.0.2.27]"); # ["192.0.2.27"]

DESCRIPTION
"Sisimai::RFC791" is a class related to IP

CLASS METHODS

  "is_ipv4address(String)"
"is_ipv4address" method returns 1 if the argument is an valid IPv4 address.

    print Sisimai::RFC791->is_ipv4address("192.0.2.25");   # 1
    print Sisimai::RFC791->is_ipv4address("123.456.78.9"); # 0

  "find(String)"
"find" method return all the IPv4 address found in the given string.

    my $v = "connection refused from 192.0.2.1, DNSBL returned 127.0.0.2";
    my $p = Sisimai::RFC791->find($v); # ["192.0.2.1", "127.0.0.2"]

AUTHOR
azumakuniyuki

COPYRIGHT
Copyright (C) 2024 azumakuniyuki, All rights reserved.

LICENSE
This software is distributed under The BSD 2-Clause License.